forked from ConsensusJ/consensusj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
122 lines (101 loc) · 3.36 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctorj-diagram:1.5.4.1'
classpath("org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1")
}
}
plugins {
id 'org.asciidoctor.convert' version '1.5.3'
id 'com.jfrog.bintray' version '1.7.3'
id 'org.ajoberstar.grgit' version '1.7.2'
id 'org.ajoberstar.github-pages' version '1.7.2'
}
apply plugin: 'maven-publish'
apply plugin: 'maven-publish-auth'
allprojects {
apply plugin: 'java'
apply plugin: 'groovy'
//apply plugin: 'findbugs'
version = bitcoinjAddonsVersion // set in gradle.properties
group = 'com.msgilligan'
repositories {
jcenter()
}
// tasks.withType(FindBugs) {
// reports {
// xml.enabled false
// html.enabled true
// }
// }
}
subprojects {
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
compile "org.bitcoinj:bitcoinj-core:${bitcoinjVersion}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
testCompile "org.codehaus.groovy:groovy:${groovyVersion}:indy"
testCompile("org.spockframework:spock-core:${spockVersion}") {
exclude module: "groovy-all"
}
testRuntime "org.slf4j:slf4j-jdk14:${slf4jVersion}" // Runtime implementation of slf4j
}
// See http://blog.freeside.co/2014/06/24/gradle-and-groovys-invoke-dynamic-support/
configurations.all {
resolutionStrategy {
force "org.codehaus.groovy:groovy:${groovyVersion}:indy"
force "org.codehaus.groovy:groovy-json:${groovyVersion}:indy"
}
}
compileJava {
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
tasks.withType(JavaCompile) {
doFirst {
if (sourceCompatibility == '1.7' && System.env.JDK7_HOME != null) {
options.bootClasspath = "$System.env.JDK7_HOME/jre/lib/rt.jar"
//options.bootClasspath += "$File.pathSeparator$System.env.JDK7_HOME/jre/lib/jce.jar"
// use the line above as an example to add jce.jar
// and other specific JDK jars
}
}
}
tasks.withType(GroovyCompile) {
groovyOptions.optimizationOptions.indy = true
}
}
apply from: 'gradle/idea.gradle'
apply from: 'gradle/javadoc.gradle'
apply from: 'gradle/asciidoctor.gradle'
apply from: 'gradle/github-pages.gradle'
apply from: 'gradle/bintray.gradle'
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}
build.dependsOn subprojects.build
task buildCI(dependsOn: [build, testReport, javadocAll, asciidoctor])
task jenkinsBuild(dependsOn: buildCI)
task printVersion {
println project.version
}
publishing {
publications {
mavenJava(MavenPublication) {
from project.components.java
}
}
repositories {
maven {
name 'nexus'
url 'http://maven.gem.internal:8081/repository/maven-snapshots'
// TODO: automate this
// replace the snapshot url with the one below to do a release
// url 'http://maven.gem.internal:8081/repository/maven-releases'
}
}
}