tudbutil/build.gradle
TudbuT db5a34af42
All checks were successful
/ Build & Publish (push) Successful in 1m53s
Initial commit
2025-12-10 19:02:47 +01:00

76 lines
1.6 KiB
Groovy

plugins {
id 'java'
id 'maven-publish'
}
repositories {
mavenCentral()
maven { url = 'https://git.tudbut.de/api/packages/TudbuT/maven' }
}
configurations {
jarLibs
reloadQuickly {
resolutionStrategy.cacheDynamicVersionsFor(10, 'minutes')
resolutionStrategy.cacheChangingModulesFor(10, 'minutes')
}
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileJava {
options.encoding = "UTF-8"
}
dependencies {
implementation(reloadQuickly('de.tudbut:darkreflection:+'))
}
javadoc {
options.encoding = "UTF-8"
source = sourceSets.main.allJava
classpath = configurations.implementation
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.jarLibs.collect {
it.isDirectory() ? it : zipTree(it)
}
} {
exclude "LICENSE.txt", "META-INF/MANIFSET.MF", "META-INF/maven/**", "META-INF/*.RSA", "META-INF/*.SF"
}
}
//jar.dependsOn("javadoc")
publishing {
publications {
mavenJava(MavenPublication) {
groupId = "de.tudbut"
version = System.getenv("TL_VERSION")
from components.java
}
}
repositories {
maven {
name = "Forgejo"
url = uri("https://git.tudbut.de/api/packages/TudbuT/maven")
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "token " + System.getenv("PUBLISH_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}