-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
171 lines (148 loc) · 5.08 KB
/
build.gradle
File metadata and controls
171 lines (148 loc) · 5.08 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'org.unbroken-dome.test-sets' version("4.1.0")
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = '11'
dependencies {
implementation group: 'net.java.dev.jna', name: 'jna', version: '5.15.0'
implementation group: 'net.java.dev.jna', name: 'jna-platform', version: '5.15.0'
compileOnly group: 'com.bloxbean.cardano', name: 'cardano-client-lib', version: '0.6.3'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0'
testImplementation('org.assertj:assertj-core:3.24.2')
testRuntimeOnly 'org.slf4j:slf4j-log4j12:2.0.5'
testImplementation group: 'com.bloxbean.cardano', name: 'cardano-client-lib', version: '0.6.3'
testImplementation group: 'com.bloxbean.cardano', name: 'cardano-client-backend-koios', version: '0.6.3'
testImplementation group: 'com.bloxbean.cardano', name: 'cardano-client-backend-blockfrost', version: '0.6.3'
testCompileOnly 'org.projectlombok:lombok:1.18.30'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.30'
}
sourceSets {
main {
resources {
srcDirs "src/main/resources", "native"
}
}
}
testSets {
integrationTest
}
tasks.withType(Test) {
useJUnitPlatform()
}
compileJava {
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
}
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourceJar
archives javadocJar
}
integrationTest {
description = 'Set system properties for integration tests'
systemProperty('BF_PROJECT_ID', findProperty("BF_PROJECT_ID"))
}
//create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.bloxbean.cardano.client.cli.CLIMain'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}
ext.ossrhUsername = System.getenv('MAVEN_USERNAME')
ext.ossrhPassword = System.getenv('MAVEN_PASSWORD')
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact(sourceJar) {
classifier = 'sources'
}
artifact(javadocJar) {
classifier = 'javadoc'
}
pom {
name = 'Aiken Java Binding'
description = 'A Java binding for Aiken Smart Contract Language Library'
url = 'https://github.com/bloxbean/aiken-java-binding'
licenses {
license {
name = 'The MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'satran004'
name = 'Satya'
}
developer {
id = 'matiwinnetou'
name = 'Mateusz Czeladka'
}
}
scm {
connection = 'scm:git:git://github.com/bloxbean/aiken-java-binding'
developerConnection = 'scm:git:ssh://git@github.com/bloxbean/aiken-java-binding'
url = 'https://github.com/bloxbean/aiken-java-binding'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://central.sonatype.com/repository/maven-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username = ossrhUsername
password = ossrhPassword
}
}
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
if (isReleaseVersion && !project.hasProperty("skipSigning")) {
signing {
// sign configurations.archives
sign publishing.publications
}
}