57 lines
1.0 KiB
Groovy
57 lines
1.0 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
group = 'com.jessebrault.fp'
|
|
version = '0.1.0'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
api libs.groovy
|
|
compileOnlyApi libs.jetbrains.anotations
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
jar {
|
|
archiveBaseName = 'com.jessebrault.fp'
|
|
}
|
|
|
|
sourcesJar {
|
|
archiveBaseName = 'com.jessebrault.fp'
|
|
}
|
|
|
|
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('fp', MavenPublication) {
|
|
artifactId = 'fp'
|
|
from components.java
|
|
}
|
|
}
|
|
}
|