mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-25 04:29:23 +01:00
This should fix the maven builds
This commit is contained in:
parent
ba6b00ffb9
commit
1e259e3f62
1 changed files with 23 additions and 4 deletions
27
build.gradle
27
build.gradle
|
@ -18,6 +18,9 @@ version = "1.12.2-r152"
|
|||
group = "de.ellpeck.actuallyadditions"
|
||||
archivesBaseName = "ActuallyAdditions"
|
||||
|
||||
// Store the mod version instead of publishing with the build number side the mod
|
||||
def modVersion = version
|
||||
|
||||
if (System.getenv('BUILD_NUMBER') != null) {
|
||||
version += "." + System.getenv('BUILD_NUMBER')
|
||||
}
|
||||
|
@ -28,7 +31,7 @@ minecraft {
|
|||
mappings = "stable_39"
|
||||
makeObfSourceJar = false
|
||||
replaceIn "ActuallyAdditions.java"
|
||||
replace "@VERSION@", project.version.toString()
|
||||
replace "@VERSION@", modVersion.toString()
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -97,14 +100,30 @@ task sourcesJar(type: Jar) {
|
|||
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
artifacts {
|
||||
archives deobfJar, sourcesJar, apiJar, javadocJar
|
||||
}
|
||||
|
||||
publishing {
|
||||
tasks.publish.dependsOn build
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact jar
|
||||
groupId = group
|
||||
artifactId = archivesBaseName
|
||||
version = version
|
||||
|
||||
from components.java
|
||||
|
||||
artifact deobfJar
|
||||
artifact sourcesJar
|
||||
artifact apiJar
|
||||
artifact javadocJar
|
||||
artifact sourcesJar
|
||||
artifact deobfJar
|
||||
|
||||
pom.withXml {
|
||||
def node = asNode()
|
||||
if (node.dependencies.size() > 0)
|
||||
node.remove(node.dependencies)
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
|
|
Loading…
Reference in a new issue