-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (87 loc) · 3.14 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
buildscript {
ext {
kotlin_group = 'org.jetbrains.kotlin'
kotlin_version = '1.2.71'
corda_artifactory_url = 'https://software.r3.com/artifactory'
corda_group = 'net.corda'
corda_release_version = '4.9'
corda_gradle_plugin_group = 'net.corda.plugins'
corda_gradle_plugin_version = '5.0.4'
junit_group = 'org.junit.jupiter'
junit_version = '5.3.1'
cordapp_platform_version = 11
cordapp_contract_name = 'ONIXLabs Corda Core Contract'
cordapp_workflow_name = 'ONIXLabs Corda Core Workflow'
cordapp_vendor_name = 'ONIXLabs'
cordapp_license = 'Apache License, Version 2.0'
cordapp_version_id = 1
cordapp_signing_enabled = true
cordapp_signing_alias = 'cordapp-signer'
cordapp_signing_storetype = 'PKCS12'
cordapp_signing_keystore = findProperty('onixlabs.production.jarsign.keystore') ?: getProperty('onixlabs.development.jarsign.keystore')
cordapp_signing_password = findProperty('onixlabs.production.jarsign.password') ?: getProperty('onixlabs.development.jarsign.password')
}
repositories {
mavenLocal()
mavenCentral()
maven { url "$corda_artifactory_url/corda-releases" }
maven { url "$corda_artifactory_url/corda-dependencies" }
}
dependencies {
classpath "$kotlin_group:kotlin-gradle-plugin:$kotlin_version"
classpath "$corda_gradle_plugin_group:cordapp:$corda_gradle_plugin_version"
}
}
group getProperty('group')
version getProperty('version')
subprojects {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "$corda_artifactory_url/corda-releases" }
maven { url "$corda_artifactory_url/corda-dependencies" }
maven { url "https://repo.gradle.org/gradle/libs-releases" }
}
configurations {
all {
exclude module: 'slf4j-log4j12'
exclude module: 'log4j-slf4j-impl'
}
}
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'net.corda.plugins.cordapp'
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
languageVersion = "1.2"
apiVersion = "1.2"
jvmTarget = "1.8"
javaParameters = true
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = "sources"
}
jar {
exclude '**/log4j2*.xml'
}
test {
jvmArgs = ["-ea", "-javaagent:../lib/quasar.jar"]
maxHeapSize = "4096m"
useJUnitPlatform()
}
}
task cleanLocal(type: Exec) {
def shellExec = System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows') ? 'cmd' : 'sh'
commandLine shellExec, './clean-cache.sh'
}
task releaseLocal(type: GradleBuild) {
startParameter = gradle.startParameter.newInstance()
tasks = ['clean', 'build', 'publishToMavenLocal']
}
task releasePublic(type: GradleBuild) {
startParameter = gradle.startParameter.newInstance()
tasks = ['clean', 'build', 'publishToMavenLocal', 'publish']
}