-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
57 lines (48 loc) · 1.21 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
apply plugin: 'java'
apply plugin: 'signing'
apply plugin: 'maven-publish'
group 'ee.euro2'
version '0.0.1-SNAPSHOT'
jar {
baseName = 'contract-java-abi'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile("org.web3j:core:3.5.0")
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
repositories {
mavenLocal()
maven {
def repoUrl = project.version.endsWith('-SNAPSHOT') ? "https://oss.sonatype.org/content/repositories/snapshots" : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
url repoUrl
credentials(PasswordCredentials) {
username "${System.env.OSSRH_USERNAME}"
password "${System.env.OSSRH_PASSWORD}"
}
}
}
}