Skip to content

Commit

Permalink
changed publishing of common and fabric modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Oct 13, 2024
1 parent b6a27e1 commit 3e9ca99
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 30 deletions.
30 changes: 0 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,5 @@ subprojects {
}
println("In CI mode")
}
publishing {
publications {
mavenJava(org.gradle.api.publish.maven.MavenPublication) {
artifactId = "gtcore-" + project.name
from components.java
/*artifact(sourcesJar) {
builtBy remapSourcesJar
}

afterEvaluate {
artifact remapJar
if (project.name != "common"){
artifact shadowJar
}
}*/
}
}
repositories {
if (isCI && isRELEASE) {
maven {
url = "https://repo.repsy.io/mvn/trinsdar/gregtech-intergalactical/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
} else {
mavenLocal()
}
}
}
}
31 changes: 31 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,35 @@ dependencies {
}
modCompileOnly("curse.maven:the-one-probe-fabric-581847:${project.top_fabric_file}")
modImplementation "maven.modrinth:carbon-config:${project.carbon_config_fabric_version}"
}

publishing {
publications {
mavenJava(org.gradle.api.publish.maven.MavenPublication) {
artifactId = "gtcore-" + project.name
//from components.java
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifact jar
afterEvaluate {
artifact remapJar
}
}
}
repositories {
def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
if (isCI && isRELEASE) {
maven {
url = "https://repo.repsy.io/mvn/trinsdar/gregtech-intergalactical/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
} else {
mavenLocal()
}
}
}
31 changes: 31 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,35 @@ tasks.withType(JavaCompile) {

sourcesJar {
from(project(':common').sourceSets.main.allSource)
}

publishing {
publications {
mavenJava(org.gradle.api.publish.maven.MavenPublication) {
artifactId = "gtcore-" + project.name
//from components.java
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifact jar
afterEvaluate {
artifact remapJar
}
}
}
repositories {
def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
if (isCI && isRELEASE) {
maven {
url = "https://repo.repsy.io/mvn/trinsdar/gregtech-intergalactical/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
} else {
mavenLocal()
}
}
}

0 comments on commit 3e9ca99

Please sign in to comment.