-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (66 loc) · 2.42 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
buildscript {
ext {
kotlinVersion = '1.3.21'
archNavigationVersion = '1.0.0-rc02'
}
repositories {
google()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04'
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${kotlinVersion}"
}
}
ext {
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
minSdkVersion = 25
targetSdkVersion = 28
androidxCollectionVersion = '1.0.0'
androidxCoreVersion = '1.0.1'
androidxFragmentVersion = '1.0.0'
androidxAppcompatVersion = '1.0.2'
androidxAnnotationVersion = '1.0.1'
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'http://dl.bintray.com/kotlin/kotlinx' }
}
configurations.all {
resolutionStrategy {
force "androidx.annotation:annotation:${androidxAnnotationVersion}"
force "androidx.appcompat:appcompat:${androidxAppcompatVersion}"
force "androidx.core:core:${androidxCoreVersion}"
force "androidx.core:core-ktx:${androidxCoreVersion}"
force "androidx.fragment:fragment-ktx:${androidxFragmentVersion}"
dependencySubstitution {
substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre7") with module("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}")
}
}
}
plugins.withId('kotlin-android') {
project.android.sourceSets*.java.each {
it.srcDirs = it.srcDirs.collect {
it.name == 'java' ? new File(it.parentFile, 'kotlin') : it
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}"
if (!project.plugins.hasPlugin('com.android.test')) {
testImplementation "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${kotlinVersion}"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}