forked from GENERALBYTESCOM/batm_public
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
71 lines (67 loc) · 2.62 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
buildscript {
ext.with {
hasGbArtifactory = (project.hasProperty('gbArtifactoryUrl')
&& project.hasProperty('gbArtifactoryUser')
&& project.hasProperty('gbArtifactoryPassword'))
hasGbUploadArtifactory = (project.hasProperty('gbArtifactoryUploadUrl')
&& project.hasProperty('gbArtifactoryUser')
&& project.hasProperty('gbArtifactoryPassword'))
setRepositoriesFor = { RepositoryHandler repositoryHandler ->
if (hasGbArtifactory) {
repositoryHandler.maven {
credentials {
username gbArtifactoryUser
password gbArtifactoryPassword
}
url gbArtifactoryUrl
}
}
repositoryHandler.mavenCentral()
repositoryHandler.maven { url 'https://jitpack.io' }
}
batmDependencySubstitutionConfig = file('dependencySubstitutions.txt')
batmDependencyChecksumsConfig = file('dependencyChecksums.txt')
}
setRepositoriesFor(repositories)
}
allprojects {
setRepositoriesFor(buildscript.repositories)
setRepositoriesFor(repositories)
repositories {
//bitcoin-json-rpc-client-1.0.jar isn't part of any well known maven repo
//so we search the libs dir; gradle generates (guesses) metadata except dependencies.
//Artifacts from repos with real metadata take precedence.
flatDir {
dirs rootProject.file('libs')
}
}
tasks.withType(JavaCompile) {
project.sourceCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
options.incremental = true
}
// Jars with the same contents should have the same checksums
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
afterEvaluate {
if (pluginManager.hasPlugin('com.generalbytes.gradle.dependency.verification')) {
dependencyChecksums {
global = true
}
dependencyVerifications {
// setConfigurations([]) // effectively turns off all checksum verifications
// failOnChecksumError = false // turns off failure on checksum problem (only warnings are printed)
}
}
if (pluginManager.hasPlugin('com.generalbytes.gradle.dependency.strict')) {
strictDependencies {
// conflictFail false // turns off failure on version conflict
}
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
}