Fix maven artifacts and publishing. Close #4
This commit is contained in:
parent
5bd9799a53
commit
e0281b6146
|
|
@ -1,6 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id('java')
|
id('java')
|
||||||
id('org.spongepowered.gradle.vanilla') version '0.2.1-SNAPSHOT'
|
id('org.spongepowered.gradle.vanilla') version '0.2.1-SNAPSHOT'
|
||||||
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
archivesBaseName = "${mod_name}-common-${minecraft_version}"
|
archivesBaseName = "${mod_name}-common-${minecraft_version}"
|
||||||
|
|
@ -32,4 +33,18 @@ processResources {
|
||||||
|
|
||||||
expand buildProps
|
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 {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
artifact(remapJar) {
|
groupId project.group
|
||||||
builtBy remapJar
|
artifactId project.archivesBaseName
|
||||||
}
|
version project.version
|
||||||
artifact(sourcesJar) {
|
from components.java
|
||||||
builtBy remapSourcesJar
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
url "file://" + System.getenv("local_maven")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,15 @@ jar.finalizedBy('reobfJar')
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
|
groupId project.group
|
||||||
|
artifactId project.archivesBaseName
|
||||||
|
version project.version
|
||||||
artifact jar
|
artifact jar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "file://${project.projectDir}/mcmodsrepo"
|
url "file://" + System.getenv("local_maven")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,12 @@ subprojects {
|
||||||
it.options.encoding = 'UTF-8'
|
it.options.encoding = 'UTF-8'
|
||||||
it.options.release = 17
|
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