-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
101 lines (89 loc) · 2.92 KB
/
build.gradle.kts
File metadata and controls
101 lines (89 loc) · 2.92 KB
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
group = "io.github.wldt"
version = "0.7.0"
description = "The core library to build White Label Digital Twins"
java.sourceCompatibility = JavaVersion.VERSION_1_8
plugins {
id("com.vanniktech.maven.publish") version "0.35.0"
`java-library`
`maven-publish`
signing
}
repositories {
mavenCentral()
mavenLocal()
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.1")
//testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
// Comment before publishing to avoid double signing of the same dependency
//testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.1")
}
tasks.named<Test>("test") {
// Comment before publishing
//useJUnitPlatform()
// Uncomment before publishing
enabled = false
}
java {
//withJavadocJar() // Removed to avoid double signing
withSourcesJar()
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
// ✅ FIX ESATTO PER GRADLE 9.2.1 + vanniktech.maven.publish 0.35.0
afterEvaluate {
val plainJavadocJarTask = tasks.findByName("plainJavadocJar")
val metadataTask = tasks.findByName("generateMetadataFileForMavenPublication")
if (plainJavadocJarTask != null && metadataTask != null) {
metadataTask.dependsOn(plainJavadocJarTask)
}
}
mavenPublishing {
coordinates(group.toString(), name.toString(), version.toString())
pom {
name.set("WLDT Core")
description.set("The WLDT Core Java Module to build Digital Twins")
inceptionYear.set("2025")
url.set("https://github.com/wldt/wldt-core-java")
licenses {
license {
name.set("WLDT License")
url.set("https://github.com/wldt/wldt-core-java/blob/main/LICENSE")
distribution.set("https://github.com/wldt/wldt-core-java/blob/main/LICENSE")
}
}
developers {
developer {
id.set("piconem")
name.set("Marco Picone")
url.set("https://github.com/piconem")
}
developer {
id.set("samubura")
name.set("Samuele Burattini")
url.set("https://github.com/samubura")
}
developer {
id.set("RiccardoMorandi")
name.set("Riccardo Morandi")
url.set("https://github.com/RiccardoMorandi")
}
}
scm {
url.set("https://github.com/wldt/wldt-core-java")
connection.set("scm:git:git://github.com/wldt/wldt-core-java.git")
developerConnection.set("scm:git:ssh://git@github.com/wldt/wldt-core-java.git")
}
}
}