From 9fd623d70c17069de0c2775642609b886c0c7f39 Mon Sep 17 00:00:00 2001 From: uTen2c Date: Tue, 2 Jan 2024 12:03:30 +0900 Subject: [PATCH] Fork --- .github/workflows/publish.yml | 27 +++++++++++ .gitmodules | 2 +- build.gradle | 11 ----- common/java-cef | 2 +- .../java/com/cinemamod/mcef/MCEFSettings.java | 2 +- fabric/build.gradle | 48 ++++--------------- fabric/gradle.properties | 4 +- fabric/src/main/resources/fabric.mod.json | 7 ++- forge/build.gradle | 45 ----------------- forge/gradle.properties | 3 +- forge/src/main/resources/META-INF/mods.toml | 4 +- gradle.properties | 1 - 12 files changed, 45 insertions(+), 111 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..701bdf11 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish + +on: [ push ] + +concurrency: ci-${{ github.ref }} + +jobs: + publish: + permissions: + contents: write + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'ci-skip')" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + cache: gradle + - name: Publish to Maven repository + uses: uTen2c/publish-to-github@v1.2 + with: + publish-path: ${{ github.workspace }}/build/repo + publish-task: fabric:publish + repo: ${{ secrets.REPO }} + token-user: ${{ secrets.TOKEN_USER }} + token: ${{ secrets.TOKEN }} diff --git a/.gitmodules b/.gitmodules index 47528bcf..0d20e79c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "common/java-cef"] path = common/java-cef - url = https://github.com/CinemaMod/java-cef.git + url = git@github.com:rainbootsmc/java-cef.git diff --git a/build.gradle b/build.gradle index f36574a5..edcf083c 100644 --- a/build.gradle +++ b/build.gradle @@ -39,17 +39,6 @@ tasks.register('publishMaven', GradleBuild) { ] } -tasks.register('publishCurseforge', GradleBuild) { - group = 'mcef' - tasks = [ - ':common:clean', - ':forge:clean', - ':fabric:clean', - ':forge:curseforge', - ':fabric:curseforge' - ] -} - tasks.register('fabricClient', GradleBuild) { group = 'mcef' tasks = [ diff --git a/common/java-cef b/common/java-cef index d5e3cece..f7caffa0 160000 --- a/common/java-cef +++ b/common/java-cef @@ -1 +1 @@ -Subproject commit d5e3cece98755ff1e5af39261e6a486a5d9adb5d +Subproject commit f7caffa0911d288f6b945fa8f9a34577ba56ff5b diff --git a/common/src/main/java/com/cinemamod/mcef/MCEFSettings.java b/common/src/main/java/com/cinemamod/mcef/MCEFSettings.java index a2d3b15e..89d76cfb 100644 --- a/common/src/main/java/com/cinemamod/mcef/MCEFSettings.java +++ b/common/src/main/java/com/cinemamod/mcef/MCEFSettings.java @@ -45,7 +45,7 @@ public class MCEFSettings { public MCEFSettings() { skipDownload = false; - downloadMirror = "https://mcef-download.cinemamod.com"; + downloadMirror = "https://cdn.rainbootsmc.net"; userAgent = null; useCache = true; } diff --git a/fabric/build.gradle b/fabric/build.gradle index 6cb5ca61..1409ef76 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,6 +1,5 @@ plugins { id 'fabric-loom' - id 'com.matthewprenger.cursegradle' version "${cursegradle_version}" id 'com.github.johnrengelman.shadow' version "${shadow_version}" id 'maven-publish' } @@ -21,32 +20,21 @@ repositories { mavenLocal() } -/* - Add the following to ~/.gradle/gradle.properties - systemProp.org.gradle.s3.endpoint=https:// - MCEF_S3_PUBLISH_URL_SNAPSHOT=s3:///repositories/snapshots - MCEF_S3_PUBLISH_URL_RELEASE=s3:///repositories/releases - MCEF_S3_PUBLISH_ACCESS_KEY= - MCEF_S3_PUBLISH_SECRET_KEY= - */ publishing { - repositories { - maven { - url ((mcef_version.toString().endsWith("SNAPSHOT")) ? findProperty('MCEF_S3_PUBLISH_URL_SNAPSHOT') : findProperty('MCEF_S3_PUBLISH_URL_RELEASE')) - credentials(AwsCredentials) { - accessKey = findProperty('MCEF_S3_PUBLISH_ACCESS_KEY') - secretKey = findProperty('MCEF_S3_PUBLISH_SECRET_KEY') - } - } - } publications { - mavenJava(MavenPublication) { + maven(MavenPublication) { from components.java - groupId = 'com.cinemamod' + groupId = 'net.rainbootsmc' artifactId = 'mcef-fabric' version = mcef_version } } + def publishPath = System.getenv("PUBLISH_PATH") + repositories { + maven { + url publishPath + } + } } dependencies { @@ -133,26 +121,6 @@ jar { } } -curseforge { - apiKey = file("${rootDir}/curseforge_api_key.txt").exists() ? file("${rootDir}/curseforge_api_key.txt").text : '' - project { - id = curse_id - releaseType = release_type - addGameVersion minecraft_version - addGameVersion 'Fabric' - addGameVersion "Java ${java_version}" - mainArtifact(file("${buildDir}/libs/${archivesBaseName}-${version}.jar")) { - displayName = "[FABRIC][${minecraft_version}] ${mod_name} ${mod_version}" - } - afterEvaluate { - uploadTask.dependsOn(remapJar) - } - } - options { - forgeGradleIntegration = false - } -} - shadowJar { configurations = [project.configurations.shadow] archiveClassifier = 'shadow-dev' diff --git a/fabric/gradle.properties b/fabric/gradle.properties index b9e93d63..c9a1d31b 100644 --- a/fabric/gradle.properties +++ b/fabric/gradle.properties @@ -2,14 +2,12 @@ org.gradle.jvmargs=-Xmx4G org.gradle.daemon=false minecraft_dependency=1.20.1 -curseforge_minecraft_version=1.20.1 fabric_version=0.83.0+1.20.1 min_fabric_version=0.83.0+1.20.1 -maven_group=com.cinemamod +maven_group=net.rainbootsmc archives_base_name=mcef-fabric -curse_id=636236 release_type=release recommended=true \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index e0eb7c02..37e2bb6b 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -8,10 +8,9 @@ "${mod_vendor}" ], "contact": { - "homepage": "https://github.com/CinemaMod/mcef", - "issues": "https://github.com/CinemaMod/mcef/issues", - "sources": "https://github.com/CinemaMod/mcef", - "discord": "https://discord.gg/rNrh5kW8Ty" + "homepage": "https://github.com/rainbootsmc/mcef", + "issues": "https://github.com/rainbootsmc/mcef/issues", + "sources": "https://github.com/rainbootsmc/mcef" }, "license": "LGPL 2.1", "icon": "icon.png", diff --git a/forge/build.gradle b/forge/build.gradle index ce914b73..ed297526 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,9 +1,7 @@ plugins { id 'net.neoforged.gradle' version '6.0.+' id "org.spongepowered.mixin" version "0.7.+" - id 'com.matthewprenger.cursegradle' version "${cursegradle_version}" id 'com.github.johnrengelman.shadow' version "${shadow_version}" - id 'maven-publish' } var mod_version = mcef_version @@ -35,34 +33,6 @@ mixin { config 'mcef.mixins.json' } -/* - Add the following to ~/.gradle/gradle.properties - systemProp.org.gradle.s3.endpoint=https:// - MCEF_S3_PUBLISH_URL_SNAPSHOT=s3:///repositories/snapshots - MCEF_S3_PUBLISH_URL_RELEASE=s3:///repositories/releases - MCEF_S3_PUBLISH_ACCESS_KEY= - MCEF_S3_PUBLISH_SECRET_KEY= - */ -publishing { - repositories { - maven { - url ((mcef_version.toString().endsWith("SNAPSHOT")) ? findProperty('MCEF_S3_PUBLISH_URL_SNAPSHOT') : findProperty('MCEF_S3_PUBLISH_URL_RELEASE')) - credentials(AwsCredentials) { - accessKey = findProperty('MCEF_S3_PUBLISH_ACCESS_KEY') - secretKey = findProperty('MCEF_S3_PUBLISH_SECRET_KEY') - } - } - } - publications { - mavenJava(MavenPublication) { - from components.java - groupId = 'com.cinemamod' - artifactId = 'mcef-forge' - version = mcef_version - } - } -} - sourceSets.main.resources { srcDir 'src/generated/resources' } configurations { @@ -135,21 +105,6 @@ tasks.register('deobfJar', Jar) { from sourceSets.main.output } -curseforge { - apiKey = file("${rootDir}/curseforge_api_key.txt").exists() ? file("${rootDir}/curseforge_api_key.txt").text : '' - project { - id = curse_id - releaseType = release_type - addGameVersion minecraft_version - addGameVersion 'Forge' - addGameVersion 'NeoForge' - addGameVersion "Java ${java_version}" - mainArtifact(jar) { - displayName = "[FORGE][${minecraft_version}] ${mod_name} ${mod_version}" - } - } -} - jar.finalizedBy('reobfJar') shadowJar { diff --git a/forge/gradle.properties b/forge/gradle.properties index 48d16c86..0d3ecba9 100644 --- a/forge/gradle.properties +++ b/forge/gradle.properties @@ -5,9 +5,8 @@ forge_loader_requirement=[47,) forge_requirement=[47.0.1,) forge_version=47.1.56 -mod_packagename=com.cinemamod +mod_packagename=net.rainbootsmc archives_base_name=mcef-forge -curse_id=636236 release_type=release recommended=true \ No newline at end of file diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 0a7bd4da..8f1e1466 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,8 +1,8 @@ modLoader="javafml" loaderVersion="${forge_loader_requirement}" license="LGPL" -issueTrackerURL="https://github.com/CinemaMod/mcef/issues" -displayURL="https://github.com/CinemaMod/mcef" +issueTrackerURL="https://github.com/rainbootsmc/mcef/issues" +displayURL="https://github.com/rainbootsmc/mcef" logoFile="icon.png" # credits="" authors="ds58" diff --git a/gradle.properties b/gradle.properties index b3c2b7e8..0a205850 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,5 +15,4 @@ mod_name=MCEF (Minecraft Chromium Embedded Framework) mod_vendor=CinemaMod Group fabric_loom_version=1.3-SNAPSHOT -cursegradle_version=1.4.0 shadow_version=8.1.1