-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
132 lines (118 loc) · 3.99 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
}
}
plugins {
id 'java-library'
id 'org.cadixdev.licenser' version '0.6.1'
id 'eclipse'
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
group = "io.github.matyrobbrt"
archivesBaseName = "curseforgeapi"
version = "${version}"
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'com.github.mizosoft.methanol', name: 'methanol', version: '1.6.0'
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.36'
testImplementation group: 'io.github.cdimascio', name: 'dotenv-java', version: '2.2.3'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.22.0'
def jupiterVersion = '5.8.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: jupiterVersion
}
license {
header = file("$rootDir/licenseheader.txt")
properties {
name = 'Matyrobbrt'
year = 2022
}
include '**/*.java'
}
java {
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
allprojects {
compileJava {
options.release = 17
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'io.codearte.nexus-staging'
publishing {
publications{
mavenJava(MavenPublication) {
from components.java
pom {
name = "curseforgeapi"
description = "A Java wrapper for the CurseForge API"
url = 'https://github.com/Matyrobbrt/CurseForgeJavaAPI'
licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'matyrobbrt'
name = 'Matyrobbrt'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git:github.com/matyrobbrt/curseforgejavaapi.git'
developerConnection = 'scm:git:ssh://github.com/Matyrobbrt/CurseForgeJavaAPI.git'
url = 'https://github.com/Matyrobbrt/CurseForgeJavaAPI'
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = project.hasProperty("snapshot") ?
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = findProperty("ossrhUser") ? ossrhUser : ""
password = findProperty("ossrhPassword") ? ossrhPassword : ""
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
username = findProperty("ossrhUser") ? ossrhUser : ""
password = findProperty("ossrhPassword") ? ossrhPassword : ""
}
if (project.hasProperty("close")) {
tasks.publish.finalizedBy closeAndReleaseRepository
}
jar {
destinationDirectory = file("./build/libs/${version}/")
}
javadocJar {
destinationDirectory = file("./build/libs/${version}/")
}
sourcesJar {
destinationDirectory = file("./build/libs/${version}/")
}
}
compileJava.options.encoding = "UTF-8"