Skip to content

Commit

Permalink
Fork
Browse files Browse the repository at this point in the history
  • Loading branch information
uTen2c committed Jan 2, 2024
1 parent 0617546 commit 9fd623d
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 111 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
publish-path: ${{ github.workspace }}/build/repo
publish-task: fabric:publish
repo: ${{ secrets.REPO }}
token-user: ${{ secrets.TOKEN_USER }}
token: ${{ secrets.TOKEN }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
11 changes: 0 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion common/java-cef
2 changes: 1 addition & 1 deletion common/src/main/java/com/cinemamod/mcef/MCEFSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
48 changes: 8 additions & 40 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
Expand All @@ -21,32 +20,21 @@ repositories {
mavenLocal()
}

/*
Add the following to ~/.gradle/gradle.properties
systemProp.org.gradle.s3.endpoint=https://<the s3 endpoint>
MCEF_S3_PUBLISH_URL_SNAPSHOT=s3://<bucket>/repositories/snapshots
MCEF_S3_PUBLISH_URL_RELEASE=s3://<bucket>/repositories/releases
MCEF_S3_PUBLISH_ACCESS_KEY=<access key>
MCEF_S3_PUBLISH_SECRET_KEY=<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 {
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 1 addition & 3 deletions fabric/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
45 changes: 0 additions & 45 deletions forge/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -35,34 +33,6 @@ mixin {
config 'mcef.mixins.json'
}

/*
Add the following to ~/.gradle/gradle.properties
systemProp.org.gradle.s3.endpoint=https://<the s3 endpoint>
MCEF_S3_PUBLISH_URL_SNAPSHOT=s3://<bucket>/repositories/snapshots
MCEF_S3_PUBLISH_URL_RELEASE=s3://<bucket>/repositories/releases
MCEF_S3_PUBLISH_ACCESS_KEY=<access key>
MCEF_S3_PUBLISH_SECRET_KEY=<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 {
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9fd623d

Please sign in to comment.