Fix maven artifacts and publishing. Close #4
This commit is contained in:
parent
5bd9799a53
commit
e0281b6146
|
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
id('java')
|
||||
id('org.spongepowered.gradle.vanilla') version '0.2.1-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "${mod_name}-common-${minecraft_version}"
|
||||
|
|
@ -32,4 +33,18 @@ processResources {
|
|||
|
||||
expand buildProps
|
||||
}
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
url "file://" + System.getenv("local_maven")
|
||||
}
|
||||
}
|
||||
|
|
@ -54,15 +54,14 @@ jar {
|
|||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
artifact(sourcesJar) {
|
||||
builtBy remapSourcesJar
|
||||
}
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
url "file://" + System.getenv("local_maven")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,12 +85,15 @@ jar.finalizedBy('reobfJar')
|
|||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
artifact jar
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file://${project.projectDir}/mcmodsrepo"
|
||||
url "file://" + System.getenv("local_maven")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,12 @@ subprojects {
|
|||
it.options.encoding = 'UTF-8'
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
// Disables Gradle's custom module metadata from being published to maven. The
|
||||
// metadata includes mapped dependencies which are not reasonably consumable by
|
||||
// other mod developers.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user