Rework buildSrc and update some dependencies (#1296)
This commit is contained in:
parent
318aeae500
commit
0afd6551aa
5 changed files with 38 additions and 42 deletions
|
@ -2,24 +2,7 @@
|
|||
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
|
||||
* SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
buildscript {
|
||||
apply(from = "buildSrc/buildDependencies.gradle")
|
||||
val build: Map<Any, Any> by extra
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
// For binary compatibility validator.
|
||||
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
|
||||
}
|
||||
dependencies {
|
||||
classpath(build.getValue("androidGradlePlugin"))
|
||||
classpath(build.getValue("binaryCompatibilityValidator"))
|
||||
classpath(build.getValue("kotlinGradlePlugin"))
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version "0.36.0"
|
||||
`binary-compatibility-validator`
|
||||
`aps-plugin`
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
apply(from = "buildDependencies.gradle")
|
||||
val build: Map<Any, Any> by extra
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
@ -9,6 +6,8 @@ repositories {
|
|||
google()
|
||||
gradlePluginPortal()
|
||||
jcenter()
|
||||
// For binary compatibility validator.
|
||||
maven { url = uri("https://kotlin.bintray.com/kotlinx") }
|
||||
}
|
||||
|
||||
kotlinDslPluginOptions {
|
||||
|
@ -33,9 +32,9 @@ gradlePlugin {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(build.getValue("kotlinGradlePlugin"))
|
||||
implementation(build.getValue("androidGradlePlugin"))
|
||||
implementation(build.getValue("binaryCompatibilityValidator"))
|
||||
implementation(build.getValue("downloadTaskPlugin"))
|
||||
implementation(build.getValue("jsemver"))
|
||||
implementation(Plugins.androidGradlePlugin)
|
||||
implementation(Plugins.binaryCompatibilityValidator)
|
||||
implementation(Plugins.downloadTaskPlugin)
|
||||
implementation(Plugins.jsemver)
|
||||
implementation(Plugins.kotlinGradlePlugin)
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
rootProject.ext.versions = [
|
||||
agp : '4.1.1',
|
||||
kotlin : '1.4.21',
|
||||
binary_compatibility_validator : '0.2.4',
|
||||
download_plugin : '4.1.1',
|
||||
semver : '0.9.0',
|
||||
]
|
||||
|
||||
rootProject.ext.build = [
|
||||
androidGradlePlugin : "com.android.tools.build:gradle:${versions.agp}",
|
||||
kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
|
||||
binaryCompatibilityValidator : "org.jetbrains.kotlinx:binary-compatibility-validator:${versions.binary_compatibility_validator}",
|
||||
downloadTaskPlugin : "de.undercouch:gradle-download-task:${versions.download_plugin}",
|
||||
jsemver : "com.github.zafarkhaja:java-semver:${versions.semver}",
|
||||
]
|
21
buildSrc/buildSrc/build.gradle.kts
Normal file
21
buildSrc/buildSrc/build.gradle.kts
Normal file
|
@ -0,0 +1,21 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
kotlinDslPluginOptions {
|
||||
experimentalWarning.set(false)
|
||||
}
|
||||
|
||||
// force compilation of Dependencies.kt so it can be referenced in buildSrc/build.gradle.kts
|
||||
sourceSets.main {
|
||||
java {
|
||||
setSrcDirs(setOf(projectDir.parentFile.resolve("src/main/java")))
|
||||
include("Dependencies.kt")
|
||||
}
|
||||
}
|
|
@ -3,7 +3,15 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
|
||||
private const val KOTLIN_VERSION = "1.4.21"
|
||||
private const val KOTLIN_VERSION = "1.4.30"
|
||||
|
||||
object Plugins {
|
||||
val androidGradlePlugin = "com.android.tools.build:gradle:4.1.1"
|
||||
val binaryCompatibilityValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:0.2.4"
|
||||
val downloadTaskPlugin = "de.undercouch:gradle-download-task:4.1.1"
|
||||
val jsemver = "com.github.zafarkhaja:java-semver:0.9.0"
|
||||
val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
|
||||
}
|
||||
|
||||
object Dependencies {
|
||||
object Kotlin {
|
||||
|
@ -51,7 +59,7 @@ object Dependencies {
|
|||
const val eddsa = "net.i2p.crypto:eddsa:0.3.0"
|
||||
const val fastscroll = "me.zhanghai.android.fastscroll:library:1.1.5"
|
||||
const val jgit = "org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r"
|
||||
const val kotlin_result = "com.michael-bull.kotlin-result:kotlin-result:1.1.9"
|
||||
const val kotlin_result = "com.michael-bull.kotlin-result:kotlin-result:1.1.10"
|
||||
const val leakcanary = "com.squareup.leakcanary:leakcanary-android:2.5"
|
||||
const val modern_android_prefs = "de.Maxr1998.android:modernpreferences:1.2.0-alpha1"
|
||||
const val plumber = "com.squareup.leakcanary:plumber-android:2.5"
|
||||
|
|
Loading…
Reference in a new issue