aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-06-01 02:54:00 +0800
committershedaniel <daniel@shedaniel.me>2021-06-01 02:54:00 +0800
commit8335ff58970cadaebf00892166f5a292131a766e (patch)
tree9f8bd9cf98ae8ac0e7589d3f5c2bb586be67fda0
parent2e60931f9f00b2387cbaee7a91909467f4de8839 (diff)
downloadRoughlyEnoughItems-8335ff58970cadaebf00892166f5a292131a766e.tar.gz
RoughlyEnoughItems-8335ff58970cadaebf00892166f5a292131a766e.tar.bz2
RoughlyEnoughItems-8335ff58970cadaebf00892166f5a292131a766e.zip
Upload to maven
-rw-r--r--.github/workflows/curseforge.yml7
-rw-r--r--api/build.gradle19
-rwxr-xr-xbuild.gradle38
-rw-r--r--default-plugin/build.gradle19
-rw-r--r--fabric/build.gradle51
-rw-r--r--gradle.properties10
-rw-r--r--runtime/build.gradle19
7 files changed, 105 insertions, 58 deletions
diff --git a/.github/workflows/curseforge.yml b/.github/workflows/curseforge.yml
index f22f5b7a2..6e35fa1c8 100644
--- a/.github/workflows/curseforge.yml
+++ b/.github/workflows/curseforge.yml
@@ -12,6 +12,7 @@ on:
- 4.x
- 5.x
- 6.x
+ - 6.x-1.17
jobs:
build:
@@ -19,12 +20,12 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v1
- - name: Set up JDK 1.8
+ - name: Set up JDK 16
uses: actions/setup-java@v1
with:
- java-version: 1.8
+ java-version: 16
- name: Upload to CurseForge
- run: ./gradlew build curseforge --stacktrace
+ run: ./gradlew build publish --stacktrace
env:
danielshe_curse_api_key: ${{ secrets.CF_API_KEY }}
BRANCH_NAME: ${{ github.ref }}
diff --git a/api/build.gradle b/api/build.gradle
index 0f2b5e415..28a7b9bc3 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -15,3 +15,22 @@ remapJar {
remapAccessWidener.set(false)
}
}
+
+java {
+ withSourcesJar()
+}
+
+publishing {
+ publications {
+ mavenCommon(MavenPublication) {
+ artifactId = rootProject.name + "-" + project.name
+ artifact remapJar
+ afterEvaluate {
+ artifact(remapSourcesJar.output) {
+ builtBy remapSourcesJar
+ classifier "sources"
+ }
+ }
+ }
+ }
+}
diff --git a/build.gradle b/build.gradle
index cf58a62e1..771f78f76 100755
--- a/build.gradle
+++ b/build.gradle
@@ -40,7 +40,6 @@ allprojects {
repositories {
maven { url "https://maven.shedaniel.me" }
maven { url "https://maven.terraformersmc.com/releases" }
- mavenLocal()
}
license {
@@ -65,36 +64,11 @@ allprojects {
}
subprojects {
-// apply plugin: "forgified-fabric-loom"
-
group = rootProject.group
version = rootProject.version
archivesBaseName = rootProject.name
-// loom {
-// silentMojangMappingsLicense()
-// }
-
- dependencies {
-// minecraft("com.mojang:minecraft:${project.minecraft_version}")
-// mappings(loom.officialMojangMappings())
-// modApi("net.fabricmc:fabric-loader:${project.fabricloader_version}")
- }
-
- /*publishing {
- publications {
- create("${archivesBaseName}_mavenJava", MavenPublication) {
- afterEvaluate {
- artifact(jar) {
- builtBy mavenJar
- }
- artifact(sourcesJar) {
- builtBy remapSourcesJar
- }
- }
- }
- }
-
+ publishing {
repositories {
if (System.getenv("MAVEN_PASS") != null) {
maven {
@@ -106,19 +80,11 @@ subprojects {
}
}
}
- }*/
+ }
}
task licenseFormatAll
subprojects { licenseFormatAll.dependsOn("${path}:licenseFormat") }
-//subprojects { rootProject.remapJar.dependsOn("${path}:remapJar") }
-
-//dependencies {
-// subprojects.each {
-// compile project(path: ":${it.name}", configuration: "dev")
-// include project(path: ":${it.name}", configuration: "remapped")
-// }
-//}
ext {
releaseChangelog = "No changelog"
diff --git a/default-plugin/build.gradle b/default-plugin/build.gradle
index ed76d6d14..77906c073 100644
--- a/default-plugin/build.gradle
+++ b/default-plugin/build.gradle
@@ -20,3 +20,22 @@ remapJar {
remapAccessWidener.set(false)
}
}
+
+java {
+ withSourcesJar()
+}
+
+publishing {
+ publications {
+ mavenCommon(MavenPublication) {
+ artifactId = rootProject.name + "-" + project.name
+ artifact remapJar
+ afterEvaluate {
+ artifact(remapSourcesJar.output) {
+ builtBy remapSourcesJar
+ classifier "sources"
+ }
+ }
+ }
+ }
+}
diff --git a/fabric/build.gradle b/fabric/build.gradle
index 506e1e08e..8d3aefd9d 100644
--- a/fabric/build.gradle
+++ b/fabric/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id "com.github.johnrengelman.shadow" version "5.0.0"
+ id "com.github.johnrengelman.shadow" version "7.0.0"
}
configurations {
@@ -22,6 +22,8 @@ loom {
accessWidener = file("src/main/resources/roughlyenoughitems.accessWidener")
}
+def depProjects = [":api", ":runtime", ":default-plugin"]
+
dependencies {
modApi("net.fabricmc:fabric-loader:${project.fabricloader_version}")
modRuntime("net.fabricmc.fabric-api:fabric-api:${project.fabric_api}")
@@ -31,21 +33,13 @@ dependencies {
modRuntime("com.terraformersmc:modmenu:${modmenu_version}") {
transitive(false)
}
-// modRuntime("me.shedaniel:SmoothScrollingEverywhere:3.0.3-unstable") {
-// transitive(false)
-// }
modApi("dev.architectury:architectury-fabric:${architectury_version}")
- implementation(project(path: ":api")) { transitive = false }
- implementation(project(path: ":default-plugin")) { transitive = false }
- implementation(project(path: ":runtime")) { transitive = false }
- developmentFabric(project(path: ":api")) { transitive = false }
- developmentFabric(project(path: ":default-plugin")) { transitive = false }
- developmentFabric(project(path: ":runtime")) { transitive = false }
-
- shadowCommon(project(path: ":api", configuration: "transformProductionFabric")) { transitive = false }
- shadowCommon(project(path: ":default-plugin", configuration: "transformProductionFabric")) { transitive = false }
- shadowCommon(project(path: ":runtime", configuration: "transformProductionFabric")) { transitive = false }
+ depProjects.forEach {
+ implementation(project(path: it)) { transitive = false }
+ developmentFabric(project(path: it)) { transitive = false }
+ shadowCommon(project(path: it, configuration: "transformProductionFabric")) { transitive = false }
+ }
}
shadowJar {
@@ -62,3 +56,32 @@ remapJar {
jar {
classifier "dev"
}
+
+java {
+ withSourcesJar()
+}
+
+sourcesJar {
+ afterEvaluate {
+ depProjects.forEach {
+ def depSources = project(it).sourcesJar
+ dependsOn depSources
+ from depSources.archiveFile.map { zipTree(it) }
+ }
+ }
+}
+
+publishing {
+ publications {
+ mavenFabric(MavenPublication) {
+ artifactId = rootProject.name + "-" + project.name
+ artifact(remapJar) { classifier null }
+ afterEvaluate {
+ artifact(remapSourcesJar.output) {
+ builtBy remapSourcesJar
+ classifier "sources"
+ }
+ }
+ }
+ }
+}
diff --git a/gradle.properties b/gradle.properties
index cc469c100..134c1dd1f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,14 +1,14 @@
org.gradle.jvmargs=-Xmx3G
-base_version=6.0.0
+base_version=6.0
unstable=true
-supported_version=1.17-pre1
-minecraft_version=1.17-pre1
+supported_version=1.17-pre2
+minecraft_version=1.17-pre2
forgeEnabled=false
forge_version=36.0.43
fabricloader_version=0.11.3
cloth_config_version=5.0.34
-modmenu_version=2.0.0-beta.5
+modmenu_version=2.0.0-beta.7
fabric_api=0.34.8+1.17
-architectury_version=2.0.9999
+architectury_version=2.0.5
api_exculde=
#api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric- \ No newline at end of file
diff --git a/runtime/build.gradle b/runtime/build.gradle
index e27d782e6..1a32a7a10 100644
--- a/runtime/build.gradle
+++ b/runtime/build.gradle
@@ -25,3 +25,22 @@ remapJar {
remapAccessWidener.set(false)
}
}
+
+java {
+ withSourcesJar()
+}
+
+publishing {
+ publications {
+ mavenCommon(MavenPublication) {
+ artifactId = rootProject.name + "-" + project.name
+ artifact remapJar
+ afterEvaluate {
+ artifact(remapSourcesJar.output) {
+ builtBy remapSourcesJar
+ classifier "sources"
+ }
+ }
+ }
+ }
+}