-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild.gradle.kts
146 lines (126 loc) · 4.48 KB
/
build.gradle.kts
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
id("java")
id("maven-publish")
id("signing")
id("com.gradleup.shadow") version "8.3.4" apply false
id("net.kyori.blossom") version "2.1.0" apply false
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.9" apply false
}
subprojects {
apply(plugin = "com.gradleup.shadow")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.gradle.plugin.idea-ext")
apply(plugin = "signing")
val annotationsVersion: String by project
val junitVersion: String by project
group = "io.github.lxgaming"
val compileJar: Configuration by configurations.creating
configurations {
implementation {
extendsFrom(compileJar)
}
}
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.base.archivesName.get()
version = project.version.toString()
pom {
name = "Reconstruct"
description = "ProGuard Deobfuscator"
url = "https://github.com/LXGaming/Reconstruct"
developers {
developer {
id = "lxgaming"
name = "LXGaming"
}
}
issueManagement {
system = "GitHub Issues"
url = "https://github.com/LXGaming/Reconstruct/issues"
}
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
connection = "scm:git:https://github.com/LXGaming/Reconstruct.git"
developerConnection = "scm:git:https://github.com/LXGaming/Reconstruct.git"
url = "https://github.com/LXGaming/Reconstruct"
}
}
}
}
repositories {
if (project.hasProperty("sonatypeUsername") && project.hasProperty("sonatypePassword")) {
maven {
name = "sonatype"
url = if (project.version.toString().contains("-SNAPSHOT")) {
uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
} else {
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2")
}
credentials {
username = project.property("sonatypeUsername").toString()
password = project.property("sonatypePassword").toString()
}
}
}
}
}
signing {
if (project.hasProperty("signingKey") && project.hasProperty("signingPassword")) {
useInMemoryPgpKeys(
project.property("signingKey").toString(),
project.property("signingPassword").toString()
)
}
sign(publishing.publications["maven"])
}
tasks.jar {
manifest {
attributes(
"Implementation-Title" to "Reconstruct",
"Implementation-Vendor" to "LX_Gaming",
"Implementation-Version" to project.version.toString(),
"Specification-Title" to "Reconstruct",
"Specification-Vendor" to "LX_Gaming",
"Specification-Version" to "1"
)
}
}
tasks.javadoc {
isFailOnError = false
options {
this as CoreJavadocOptions
addStringOption("Xdoclint:none", "-quiet")
}
}
tasks.test {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
}
useJUnitPlatform()
}
}
tasks.jar {
enabled = false
}