-
-
Save jmfayard/4db385d27b41cf2e14b57067cc825df2 to your computer and use it in GitHub Desktop.
Gradle buildSrcVersions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** buildSrc/src/main/kotlin/Libs.kt **/ | |
object Libs { | |
const val okhttp = "com.squareup.okhttp3:okhttp:" + Versions.okhttp | |
const val okio = "com.squareup.okio:okio:" + Versions.okio | |
//... all others | |
} | |
/** buildSrc/src/main/kotlin/Versions.kt **/ | |
object Versions { | |
const val okhttp = "3.12.1" | |
const val okio = "2.0.0" | |
// ... | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
//... | |
} | |
plugins { | |
id("de.fayard.buildSrcVersions") version "0.6.1" | |
} | |
// Don't put any code before the buildscript {} and plugins {} block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./gradlew buildSrcVersions | |
> Task :dependencyUpdates | |
> Task :buildSrcVersions | |
new file: buildSrc/build.gradle.kts | |
new file: buildSrc/.gitignore | |
new file: buildSrc/src/main/kotlin/Libs.kt | |
new file: buildSrc/src/main/kotlin/Versions.kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./gradlew buildSrcVersions | |
> Task :dependencyUpdates | |
> Task :buildSrcVersions | |
modified: buildSrc/src/main/kotlin/Libs.kt | |
modified: buildSrc/src/main/kotlin/Versions.kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Versions { | |
val moshi = "1.8.0" | |
val com_squareup_okhttp3 = "3.11.0" // available: "3.12.0" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment