-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
61 lines (52 loc) · 1.63 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
kotlin("jvm") version "2.0.0"
`maven-publish`
id("com.github.johnrengelman.shadow") version "7.0.0"
}
group = "org.valarpirai"
version = "1.0.6"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.squareup.moshi:moshi:1.15.1")
implementation("com.squareup.moshi:moshi-kotlin:1.15.1")
implementation("commons-codec:commons-codec:1.17.1")
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<ShadowJar>() {
// Minimizing a shadow JAR
minimize()
relocate("okhttp3", "org.valarpirai.shaded.okhttp3")
relocate("okio", "org.valarpirai.shaded.okio")
relocate("com.squareup.moshi", "org.valarpirai.shaded.com.squareup.moshi")
relocate("org.apache.commons", "org.valarpirai.shaded.org.apache.commons")
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/valarpirai/disposable-emails-validator-java")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = group as String
artifactId = "disposable-email"
version = version
from(components["java"])
}
}
}