aboutsummaryrefslogtreecommitdiff
path: root/buildSrc
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc')
-rw-r--r--buildSrc/build.gradle.kts15
-rw-r--r--buildSrc/buildDependencies.gradle15
-rw-r--r--buildSrc/buildSrc/build.gradle.kts21
-rw-r--r--buildSrc/src/main/java/Dependencies.kt12
4 files changed, 38 insertions, 25 deletions
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index d6b6b779..832962be 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -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)
}
diff --git a/buildSrc/buildDependencies.gradle b/buildSrc/buildDependencies.gradle
deleted file mode 100644
index 12da646a..00000000
--- a/buildSrc/buildDependencies.gradle
+++ /dev/null
@@ -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}",
-]
diff --git a/buildSrc/buildSrc/build.gradle.kts b/buildSrc/buildSrc/build.gradle.kts
new file mode 100644
index 00000000..7092e5dd
--- /dev/null
+++ b/buildSrc/buildSrc/build.gradle.kts
@@ -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")
+ }
+}
diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt
index e61fc0cf..7f1b223b 100644
--- a/buildSrc/src/main/java/Dependencies.kt
+++ b/buildSrc/src/main/java/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"