-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
120 lines (101 loc) · 2.79 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
plugins {
id 'idea'
id 'org.jetbrains.kotlin.jvm' version '1.3.20'
id 'org.jetbrains.kotlin.kapt' version '1.3.20'
id "signing"
id "io.codearte.nexus-staging" version "0.30.0"
id "maven-publish"
id "io.zensoft.versioning" version "1.1.0"
}
group = 'io.openfuture'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
// Byte code
implementation 'org.ow2.asm:asm:7.0'
implementation 'org.ow2.asm:asm-commons:7.0'
// Kotlin
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation('com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8')
implementation('com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8')
// Logger
implementation 'org.slf4j:slf4j-log4j12:1.7.25'
// Test
testImplementation 'junit:junit:4.12'
testImplementation 'org.assertj:assertj-core:3.11.1'
}
compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
}
// Jar
jar {
manifest {
attributes("Implementation-Version": version)
}
}
jar { enabled = true }
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from "build/docs/javadoc"
}
artifacts {
archives jar
archives javadocJar
archives sourceJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'open-chain-kotlin-sdk'
description = 'OPEN Platform Kotlin SDK'
url = 'https://github.com/OpenFuturePlatform/open-chain-kotlin-sdk'
licenses {
license {
name = 'MIT licence'
url = 'https://github.com/OpenFuturePlatform/open-chain-kotlin-sdk/blob/master/LICENCE.txt'
}
}
developers {
developer {
id = 'openplatform'
name = 'OPEN Platform'
}
}
scm {
url = 'https://github.com/OpenFuturePlatform/open-chain-kotlin-sdk'
}
}
}
}
repositories {
maven {
name = 'deploy'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = '${OSSRHUSERNAME}'
password = '${OSSRHPASSWORD}'
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
nexusStaging {
numberOfRetries = 40
delayBetweenRetriesInMillis = 8000
}