-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.gradle
65 lines (56 loc) · 2.01 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'extensions.gradle'
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.3.14'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.22.0'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.7.20'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}
subprojects {
if (name != 'sample') {
apply plugin: "com.vanniktech.maven.publish"
repositories {
maven {
url = version.toString().endsWith("SNAPSHOT")
? 'https://oss.sonatype.org/content/repositories/snapshots/'
: 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
}
}
}
configurations.all {
resolutionStrategy {
// Force Kotlin to use current version
force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-android-extensions-runtime:$kotlin_version"
force "junit:junit:4.13.2"
}
}
afterEvaluate {
// global dependencies for all modules
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}