forked from ethereum/ethereumj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (65 loc) · 2.31 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
wrapper {
gradleVersion = "5.6.2"
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
allprojects {
apply plugin: 'eclipse'
if (JavaVersion.current().isJava8Compatible()) {
//Disable lint of javadoc until someone fixes all the html
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
def gitCurBranch() {
def branchName = System.getenv('TRAVIS_BRANCH')
if (branchName) return branchName
def process = "git rev-parse --abbrev-ref HEAD".execute()
return process.text.trim()
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
def config = new ConfigSlurper().parse(new File("$projectDir/src/main/resources/version.properties").toURI().toURL())
group = 'org.ethereum'
version = config.versionNumber + ("master" == gitCurBranch() ? "-RELEASE" : "-SNAPSHOT")
println("Building version: " + version + " (from branch " + gitCurBranch() + ")")
compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << '-XDignore.symbol.file'
compileTestJava.options.encoding = 'UTF-8'
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/openlawteam/*")
credentials {
username = System.getenv("USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
}
maven { url 'http://nexus.nuls.center/nexus/content/repositories/public' }
jcenter()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/openlawteam/ethereumj")
credentials {
username = System.getenv("USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
// pkg {
// userOrg = 'ethereum' //An optional organization name when the repo belongs to one of the user's orgs
// repo = 'maven'
// name = 'org.ethereum'
// }
from(components.java)
}
}
}
}