-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
78 lines (67 loc) · 1.83 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("checkstyle")
id("co.uzzu.dotenv.gradle") version "4.0.0"
}
group = "ovh.neziw"
version = "1.0.2"
tasks.withType<JavaCompile> {
options.compilerArgs = listOf("-Xlint:deprecation")
options.encoding = "UTF-8"
}
tasks.withType<ShadowJar> {
archiveFileName.set("${project.name} ${project.version}.jar")
exclude(
"org/intellij/lang/annotations/**",
"org/jetbrains/annotations/**",
"org/checkerframework/**",
"META-INF/**",
"javax/**"
)
mergeServiceFiles()
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
checkstyle {
toolVersion = "10.21.0"
maxWarnings = 0
}
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
dependencies {
implementation("com.google.code.gson:gson:2.11.0")
}
tasks.build {
dependsOn(tasks.shadowJar)
}
publishing {
publications {
val publication = create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = project.name
version = "${project.version}"
}
project.shadow.component(publication)
}
repositories {
maven {
name = "neziw-repo"
url = uri("https://repo.neziw.ovh/releases/")
credentials {
val usernameKey = "MVN_USER"
val passwordKey = "MVN_PASS"
username = if (env.isPresent(usernameKey)) env.fetch(usernameKey) else System.getenv(usernameKey)
password = if (env.isPresent(passwordKey)) env.fetch(passwordKey) else System.getenv(passwordKey)
}
}
}
}