pgreze
05/17/2021, 7:22 AMbuildSrc/settings.gradle.kts
but it just didn’t work, whatever the expected behavior.
I ended-up with this file in declaration in `buildSrc/settings.gradle.kts`:
val versions = loadProperties(projectDir.resolve("../versions.properties").toString())
dependencies {
val refVerImpl: (String, String) -> Unit = { artifact, version ->
implementation("$artifact:${versions["version.$version"]}")
}
// ...
refVerImpl("com.github.triplet.gradle:play-publisher", "com.github.triplet.gradle..play-publisher")
}
and in the root `build.gradle.kts`:
@Suppress("GradlePluginVersion") buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies { // Allowing to populate versions.properties with buildSrc dependencies
classpath("com.android.tools.build:gradle:_")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:_")
classpath("com.github.triplet.gradle:play-publisher:_")
}
}
Is there a better alternative approach I could use for buildSrc dependencies?louiscad
05/17/2021, 8:29 AMsettings.gradle.kts
file:
pluginManagement {
plugins {
id("de.fayard.refreshVersions") version "0.10.0"
}
}
plugins {
id("de.fayard.refreshVersions")
}
pgreze
05/20/2021, 9:13 AMlouiscad
05/20/2021, 1:00 PM