74 lines
1.3 KiB
Groovy
74 lines
1.3 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
group = 'com.jessebrault.di'
|
|
version = '0.1.0'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
api libs.jakarta.inject
|
|
api libs.groovy
|
|
compileOnlyApi libs.jetbrains.anotations
|
|
implementation libs.slf4j.api
|
|
|
|
testImplementation libs.junit.jupiter.api
|
|
testRuntimeOnly libs.log4j.core, libs.log4j.slf4jBinding
|
|
}
|
|
|
|
test {
|
|
testLogging.showStandardStreams = true
|
|
}
|
|
|
|
testing {
|
|
suites {
|
|
test {
|
|
useJUnitJupiter()
|
|
}
|
|
}
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
jar {
|
|
archiveBaseName = 'di'
|
|
}
|
|
|
|
sourcesJar {
|
|
archiveBaseName = 'di'
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "Gitea"
|
|
url = uri("https://git.jessebrault.com/api/packages/jessebrault/maven")
|
|
|
|
credentials(HttpHeaderCredentials) {
|
|
name = "Authorization"
|
|
value = "token ${System.getenv("GITEA_ACCESS_TOKEN")}"
|
|
}
|
|
|
|
authentication {
|
|
header(HttpHeaderAuthentication)
|
|
}
|
|
}
|
|
}
|
|
|
|
publications {
|
|
create('di', MavenPublication) {
|
|
artifactId = 'di'
|
|
from components.java
|
|
}
|
|
}
|
|
}
|