forked from hyperledger/fabric-chaincode-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (62 loc) · 1.94 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
/*
* Copyright IBM Corp. 2018 All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'idea'
apply plugin: 'eclipse-wtp'
version = '2.5.2'
// If the nightly property is set, then this is the scheduled main
// build - and we should publish this to artifactory
//
// Use the .dev.<number> format to match Maven convention
if (properties.containsKey('NIGHTLY')) {
version = version + '.dev.' + getDate()
ext.nightly = true // set property for use in subprojects
} else {
ext.nightly = false
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://www.jitpack.io" }
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'org.hyperledger.fabric-chaincode-java'
version = rootProject.version
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
dependencies {
implementation 'commons-cli:commons-cli:1.6.0'
implementation 'commons-logging:commons-logging:1.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'com.github.stefanbirkner:system-rules:system-rules-1.17.0'
testCompileOnly 'junit:junit:4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.10.2'
testImplementation 'org.assertj:assertj-core:3.9.1'
}
test {
useJUnitPlatform()
}
}
task printVersionName() {
println rootProject.version
}
// Get the date in the reverse format for sorting
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMdd')
return formattedDate
}