forked from amazon-ion/ion-java-path-extraction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
170 lines (141 loc) · 4.34 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
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
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at:
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*/
buildscript {
ext.ionVersion = "[1.2,)"
ext.kotlinVersion = "[1.2,)"
ext.junitVersion = "[5.3,)"
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id "java"
id "checkstyle"
id "org.jetbrains.kotlin.jvm" version "1.4.10"
// benchmark
id "me.champeau.gradle.jmh" version "0.4.8"
// Deployment
id "maven-publish"
id "signing"
}
// Dependencies --------------------------------------------------------------
repositories {
mavenCentral()
}
group 'com.amazon.ion'
archivesBaseName = 'ion-java-path-extraction'
version '1.4.0-SNAPSHOT'
sourceCompatibility = 1.8
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
compile "com.amazon.ion:ion-java:$ionVersion"
// using kotlin to make tests less verbose
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
// JUnit 5
testCompile "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testCompile "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
}
test {
useJUnitPlatform()
}
jmh {
fork = 1
benchmarkMode = ["thrpt"]
failOnError = true
// warmup
warmupIterations = 5
// iterations
iterations = 10
}
checkstyle {
toolVersion = "8.37"
ignoreFailures = false
maxWarnings = 0
maxErrors = 0
configDir = file("$rootProject.projectDir/config/checkstyle")
}
tasks.withType(Checkstyle) {
reports {
xml.enabled = false
html.enabled = true
}
}
// Publishing
// -------------------------------------------------------------------------------
task sourcesJar(type: Jar) {
from "src"
classifier = "sources"
}
task javadocJar(type: Jar) {
from javadoc
classifier = "javadoc"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "ion-java-path-extraction"
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = "Ion Java Path Extraction"
packaging = "jar"
url = "https://github.com/amzn/ion-java-path-extraction"
description = "Ion Path Extraction API aims to combine the convenience of a DOM API with the speed of a streaming API."
scm {
connection = "scm:[email protected]:amzn/ion-java-path-extraction.git"
developerConnection = "scm:[email protected]:amzn/ion-java-path-extraction.git"
url = "[email protected]:amzn/ion-java-path-extraction.git"
}
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
name = "Amazon Ion Team"
email = "[email protected]"
organization = "Amazon Labs"
organizationUrl = "https://github.com/amzn"
}
}
}
}
}
repositories {
maven {
url "https://aws.oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}