-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
62 lines (56 loc) · 2.35 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
import java.nio.file.Paths
apply from: 'buildsystem/dependencies.gradle'
buildscript {
repositories {
google()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
final def androidPluginVersion = "3.4.2"
final def kotlinPluginVersion = rootProject.ext.kotlinVersion = "1.1.4"
final def dokkaPluginVersion = "0.9.15"
final def ktLintGradlePluginVersion = "1.3.0"
final def classpathDependencies = [
"com.android.tools.build:gradle:$androidPluginVersion",
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinPluginVersion",
"org.jetbrains.dokka:dokka-android-gradle-plugin:$dokkaPluginVersion",
"org.jetbrains.dokka:dokka-gradle-plugin:$dokkaPluginVersion",
"gradle.plugin.org.jmailen.gradle:kotlinter-gradle:$ktLintGradlePluginVersion"
]
dependencies {
classpath classpathDependencies
}
}
final def inducedVersion = System.getenv("ARTIFACT_VERSION")
final def staticAnalysisReportFolderTarget = project.rootDir.absolutePath + "/staticAnalysisReport"
rootProject.ext {
androidCompileSdkVersion = 27
androidMinSdkVersion = 14
androidTargetSdkVersion = 27
androidBuildToolsVersion = '27.0.3'
androidVersionCode = inducedVersion != null ? Integer.parseInt(inducedVersion) : 1 // Depending on the git method locally causes IDE issues
androidVersionName = String.valueOf(androidVersionCode)
androidTestInstrumentationRunner = "app.AndroidTestApplicationAndroidJUnitRunner"
androidApplicationIdBase = "org.jorge.ms.%s"
staticAnalysisReportTarget = staticAnalysisReportFolderTarget
javaVersion = JavaVersion.VERSION_1_7
}
task clean(type: Delete, overwrite: true) {
group "Verification"
description "Deletes the build directories of the whole project and the static analysis result."
rootProject.allprojects.each {
delete it.buildDir
delete Paths.get(it.projectDir.absolutePath, staticAnalysisReportFolderTarget).toAbsolutePath().toString()
}
}
subprojects {
configurations.all {
resolutionStrategy {
forcedModules = [
// Enforces the same version of Kotlin for all Kotlin libraries
"org.jetbrains.kotlin:kotlin-stdlib:$rootProject.ext.kotlinVersion",
"org.jetbrains.kotlin:kotlin-reflect:$rootProject.ext.kotlinVersion"
]
}
}
}