forked from clover/clover-android-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deps.gradle
35 lines (29 loc) · 1.42 KB
/
deps.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
apply from: file("${project.rootDir}/versions.gradle")
def printVersions = false
def requiredGradleVersion = new File("${project.rootDir}/gradleVersion").text.split('-')[1].trim()
if ("${gradle.gradleVersion}" != "$requiredGradleVersion") {
print "ERROR: Gradle version $requiredGradleVersion is required. Detected Gradle version ${gradle.gradleVersion}"
throw new GradleException("Unsupported Gradle version.")
}
ext {
mavenPlugin = "com.github.dcendents:android-maven-gradle-plugin:$MAVEN_PLUGIN_VERSION"
androidPlugin = "com.android.tools.build:gradle:$ANDROID_PLUGIN_VERSION"
kotlinPlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
sonarqubePlugin = "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:$SONARQUBE_VERSION"
}
if (printVersions) {
def gradleVersions = gradle.gradleVersion.split('\\.')
def gradleMajorVersion = gradleVersions[0].toInteger()
def gradleMinorVersion = gradleVersions[1].toInteger()
def gradleMaintenanceVersion = 0
if (gradleVersions.length >= 3) {
gradleMaintenanceVersion = gradleVersions[2].toInteger()
}
println "gradleMajorVersion = " + gradleMajorVersion
println "gradleMinorVersion = " + gradleMinorVersion
println "gradleMaintenanceVersion = " + gradleMaintenanceVersion
println "androidPlugin = " + androidPlugin
println "mavenPlugin = " + mavenPlugin
println "kotlinPlugin = " + kotlinPlugin
println "sonarqubePlugin = " + sonarqubePlugin
}