mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-06-07 13:43:37 +02:00
make the jenkins work properly for the future(tm)
This commit is contained in:
parent
f7f87f4bab
commit
21d818b010
35
build.gradle
35
build.gradle
|
@ -17,6 +17,9 @@ version = '20.3'
|
|||
group = 'de.ellpeck.naturesaura' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'NaturesAura'
|
||||
|
||||
if (System.getenv('BUILD_NUMBER') != null) {
|
||||
version += "." + System.getenv('BUILD_NUMBER')
|
||||
}
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
|
||||
minecraft {
|
||||
|
@ -119,24 +122,36 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish task
|
||||
// we define a custom artifact that is sourced from the reobfJar output task
|
||||
// and then declare that to be published
|
||||
// Note you'll need to add a repository here
|
||||
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
||||
def reobfArtifact = artifacts.add('default', reobfFile) {
|
||||
type 'jar'
|
||||
builtBy 'reobfJar'
|
||||
task deobfJar(type: Jar) {
|
||||
from(sourceSets.main.output)
|
||||
archiveName = "${baseName}-${version}-deobf.${extension}"
|
||||
}
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact reobfArtifact
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
from components.java
|
||||
|
||||
artifact deobfJar {
|
||||
classifier 'deobf'
|
||||
}
|
||||
|
||||
pom.withXml {
|
||||
def node = asNode()
|
||||
if (node.dependencies.size() > 0)
|
||||
node.remove(node.dependencies)
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
url "file://" + System.getenv("local_maven")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue