2021-08-24 02:47:37 +02:00
|
|
|
import org.gradle.util.GradleVersion
|
|
|
|
|
2018-03-06 21:13:17 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2021-02-06 20:17:11 +01:00
|
|
|
mavenCentral()
|
2018-03-06 21:13:17 +01:00
|
|
|
}
|
2021-08-24 02:47:37 +02:00
|
|
|
// If using Gradle 7, use the compatible protobuf plugin, else use the one that works with oldest supported Gradle
|
|
|
|
boolean isGradle7 = GradleVersion.current().compareTo(GradleVersion.version("7.0")) >= 0
|
2023-04-24 10:57:08 +02:00
|
|
|
def gradleProtobufVersion = isGradle7 ? "0.8.18" : "0.8.10"
|
2021-08-24 02:47:37 +02:00
|
|
|
if (isGradle7) {
|
|
|
|
System.err.println "Warning: Using com.google.protobuf:protobuf-gradle-plugin:${gradleProtobufVersion} because ${GradleVersion.current()}"
|
|
|
|
}
|
2018-03-06 21:13:17 +01:00
|
|
|
dependencies {
|
2021-08-24 02:47:37 +02:00
|
|
|
classpath "com.google.protobuf:protobuf-gradle-plugin:${gradleProtobufVersion}"
|
2018-03-06 21:13:17 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
2021-02-06 20:17:11 +01:00
|
|
|
mavenCentral()
|
2018-03-06 21:13:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
group = 'org.bitcoinj'
|
|
|
|
}
|