mirror of
https://github.com/plexusorg/Plex.git
synced 2024-06-15 16:12:31 +00:00
55 lines
1.9 KiB
Groovy
55 lines
1.9 KiB
Groovy
|
plugins {
|
||
|
id "java"
|
||
|
id "maven-publish"
|
||
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||
|
}
|
||
|
|
||
|
group = "dev.plex"
|
||
|
version = "1.1-SNAPSHOT"
|
||
|
description = "Plex"
|
||
|
|
||
|
java {
|
||
|
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||
|
}
|
||
|
|
||
|
tasks.withType(JavaCompile) {
|
||
|
options.encoding = "UTF-8"
|
||
|
}
|
||
|
|
||
|
publishing {
|
||
|
publications {
|
||
|
maven(MavenPublication) {
|
||
|
pom.withXml {
|
||
|
def dependenciesNode = asNode().appendNode("dependencies")
|
||
|
configurations.getByName("library").getAllDependencies().each { dependency ->
|
||
|
dependenciesNode.appendNode("dependency").with {
|
||
|
it.appendNode("groupId", dependency.group)
|
||
|
it.appendNode("artifactId", dependency.name)
|
||
|
it.appendNode("version", dependency.version)
|
||
|
it.appendNode("scope", "provided")
|
||
|
}
|
||
|
}
|
||
|
configurations.getByName("implementation").getAllDependencies().each { dependency ->
|
||
|
dependenciesNode.appendNode("dependency").with {
|
||
|
it.appendNode("groupId", dependency.group)
|
||
|
it.appendNode("artifactId", dependency.name)
|
||
|
it.appendNode("version", dependency.version)
|
||
|
it.appendNode("scope", "runtime")
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
artifacts = [shadowJar]
|
||
|
}
|
||
|
}
|
||
|
repositories {
|
||
|
maven {
|
||
|
def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
|
||
|
def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
||
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
||
|
credentials {
|
||
|
username = System.getenv("plexUser")
|
||
|
password = System.getenv("plexPassword")
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|