mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 01:40:26 +01:00
41 lines
1.1 KiB
Groovy
41 lines
1.1 KiB
Groovy
import org.gradle.util.GradleVersion
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
// If using Gradle 7, use the compatible protobuf plugin, else use the one that works with oldest supported Gradle
|
|
boolean isGradle7 = GradleVersion.current() >= GradleVersion.version("7.0")
|
|
def gradleProtobufVersion = isGradle7 ? "0.9.4" : "0.8.10"
|
|
if (isGradle7) {
|
|
System.err.println "Warning: Using com.google.protobuf:protobuf-gradle-plugin:${gradleProtobufVersion} because ${GradleVersion.current()}"
|
|
}
|
|
dependencies {
|
|
classpath "com.google.protobuf:protobuf-gradle-plugin:${gradleProtobufVersion}"
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
group = 'org.bitcoinj'
|
|
|
|
// Ensure standard artifacts in all projects are built reproducibly
|
|
|
|
tasks.withType(AbstractArchiveTask) {
|
|
preserveFileTimestamps = false
|
|
reproducibleFileOrder = true
|
|
}
|
|
|
|
tasks.withType(Jar) {
|
|
dirMode = 0755
|
|
fileMode = 0644
|
|
}
|
|
|
|
tasks.withType(Javadoc) {
|
|
options.noTimestamp = true
|
|
}
|
|
}
|