-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
129 lines (111 loc) · 3.72 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
plugins {
id 'java'
id 'io.freefair.lombok' version '6.4.2'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply false
}
repositories {
mavenCentral()
}
group = 'net.accelbyte.sdk'
version = '0.68.0'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
implementation 'com.google.guava:guava:33.3.1-jre'
implementation 'com.nimbusds:nimbus-jose-jwt:9.47'
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
implementation 'commons-io:commons-io:2.18.0'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.3'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.3'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.3'
}
java {
//withJavadocJar()
withSourcesJar()
}
task testCore(type: Test) {
useJUnitPlatform {
includeTags('test-core')
}
reports {
junitXml.required = true
html.required = false
}
}
task testIntegration(type: Test) {
useJUnitPlatform {
includeTags('test-integration')
}
reports {
junitXml.required = true
html.required = false
}
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from 'jd'
}
publishing {
publications{
mavenJava(MavenPublication){
//groupId = 'net.accelbyte.sdk'
artifactId = 'sdk'
//version = '0.68.0'
from components.java
afterEvaluate {
artifact javadocJar
}
pom {
name = 'accelbyte-java-sdk'
description = 'AccelByte Gaming Services Java Extend SDK generated from OpenAPI specs'
url = 'https://github.com/AccelByte/accelbyte-java-sdk'
inceptionYear = '2021'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'developer'
name = 'AccelByte Developer'
email = 'developer@accelbyte.net'
}
}
scm {
connection = 'scm:git:git:github.com/AccelByte/accelbyte-java-sdk.git'
developerConnection = 'scm:git:ssh://github.com/AccelByte/accelbyte-java-sdk.git'
url = 'https://github.com/AccelByte/accelbyte-java-sdk/'
}
}
}
}
}
if ('publishToSonatype' in gradle.startParameter.taskNames) {
// https://github.com/gradle-nexus/publish-plugin/issues/81
apply plugin: 'io.github.gradle-nexus.publish-plugin'
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("PUBLISH_OSSRH_USERNAME")
password = System.getenv("PUBLISH_OSSRH_PASSWORD")
}
}
}
}
signing {
def signingKey = System.getenv("PUBLISH_ASC_KEY")
def signingPassword = System.getenv("PUBLISH_ASC_KEY_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}