Skip to content

Commit

Permalink
Merge pull request #40 from refinedmods/release/0.5.0
Browse files Browse the repository at this point in the history
Release v0.5.0
  • Loading branch information
raoulvdberge authored Jul 3, 2023
2 parents d6ec4aa + cebce98 commit dda4663
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 37 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
required: false
type: boolean
default: true
curseforge:
required: false
type: boolean
default: false
jobs:
extract-version-number:
name: Extract version number
Expand Down Expand Up @@ -126,6 +130,23 @@ jobs:
files: |
**/build/libs/*.jar
deploy-curseforge:
name: Deploy to CurseForge
runs-on: ubuntu-latest
needs: [ build, extract-version-number, extract-changelog ]
if: ${{ inputs.curseforge == true }}
env:
RELEASE_VERSION: ${{ needs.extract-version-number.outputs.version }}
RELEASE_CHANGELOG: ${{ needs.extract-changelog.outputs.changelog }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Java
uses: refinedmods/refinedarchitect/.github/actions/setup-java@develop
- name: Deploy to CurseForge
run: ./gradlew publishCurseForge

announce-discord:
name: Announce to Discord
runs-on: ubuntu-latest
Expand All @@ -143,21 +164,6 @@ jobs:
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

announce-twitter:
name: Announce to Twitter
runs-on: ubuntu-latest
needs: [ deploy-github-releases, extract-version-number ]
if: ${{ inputs.announce == true }}
steps:
- name: Announce to Twitter
uses: ethomson/send-tweet-action@v1
with:
status: ${{ inputs.project-name }} v${{ needs.extract-version-number.outputs.version }} has been released! ${{ needs.deploy-github-releases.outputs.release-url }}
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

announce-mastodon:
name: Announce to Mastodon
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ out/
/bin/
logs/
.cache/
refinedarchitect-test/
refinedarchitect-test-fabric/
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.5.0] - 2023-07-03

### Added

- CurseForge upload support.

### Changed

- Ported to Minecraft 1.20.1

## [0.4.2] - 2023-06-20

### Fixed
Expand Down Expand Up @@ -68,7 +78,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Gradle helpers for Fabric and Forge projects.
- CI workflows.

[Unreleased]: https://github.com/refinedmods/refinedarchitect/compare/v0.4.2...HEAD
[Unreleased]: https://github.com/refinedmods/refinedarchitect/compare/v0.5.0...HEAD

[0.5.0]: https://github.com/refinedmods/refinedarchitect/compare/v0.4.2...v0.5.0

[0.4.2]: https://github.com/refinedmods/refinedarchitect/compare/v0.4.1...v0.4.2

Expand Down
78 changes: 61 additions & 17 deletions helper.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ buildscript {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'CurseForgeGradle'
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.11'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.2.1.3168'
classpath 'org.spongepowered:vanillagradle:0.2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:[6.0,6.2)'
classpath 'fabric-loom:fabric-loom.gradle.plugin:1.2-SNAPSHOT'
classpath 'net.darkhax.curseforgegradle:CurseForgeGradle:1.1.15'
}
}

Expand Down Expand Up @@ -48,6 +53,7 @@ subprojects {
it.options.encoding = 'UTF-8'
it.options.release.set(17)
it.options.deprecation = true
it.options.compilerArgs << "-Xmaxerrs" << "999"
}

repositories {
Expand All @@ -72,11 +78,14 @@ subprojects {
}

ext {
minecraftVersion = "1.19.4"
minecraftVersion = "1.20.1"
forgeVersion = "47.0.35"
fabricLoaderVersion = "0.14.21"
fabricApiVersion = "0.85.0+1.20.1"
// https://www.curseforge.com/minecraft/mc-mods/jei/files
jeiVersion = "13.1.0.11"
jeiVersion = "15.2.0.22"
// https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items/files
reiVersion = "11.0.603"
reiVersion = "12.0.626"
architecturyVersion = "8.1.73" // dependency of rei
clothMathVersion = "0.6.1" // dependency of rei
clothConfigVersion = "10.0.96" // dependency of rei
Expand Down Expand Up @@ -128,6 +137,18 @@ subprojects {
}
}

ext.enableCurseForgePublishing = { int projectId ->
task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
apiToken = System.getenv("CURSEFORGE_TOKEN")
debugMode = true

def mainFile = upload(projectId, jar)
mainFile.releaseType = project.version.toString().contains('beta') ? 'beta' : (project.version.toString().contains('alpha') ? 'alpha' : 'release')
mainFile.changelog = System.getenv("RELEASE_CHANGELOG")
mainFile.changelogType = 'markdown'
}
}

ext.commonProject = {
apply plugin: org.spongepowered.gradle.vanilla.VanillaGradle
minecraft {
Expand All @@ -141,7 +162,7 @@ subprojects {
}
}

ext.forgeProject = { String modId, Project commonProject, ArrayList apis = [], ArrayList compileApis = [] ->
ext.forgeProject = { String modId, Project commonProject = null, ArrayList apis = [], ArrayList compileApis = [] ->
apply plugin: net.minecraftforge.gradle.userdev.UserDevPlugin
minecraft {
mappings channel: 'official', version: minecraftVersion
Expand All @@ -160,7 +181,9 @@ subprojects {
compileApis.collect {
source(project(it).sourceSets.main)
}
source(commonProject.sourceSets.main)
if (commonProject != null) {
source(commonProject.sourceSets.main)
}
}
}
}
Expand All @@ -177,29 +200,41 @@ subprojects {
compileApis.collect {
source(project(it).sourceSets.main)
}
source(commonProject.sourceSets.main)
if (commonProject != null) {
source(commonProject.sourceSets.main)
}
}
}
}
data {
args '--mod', modId, '--all', '--output', commonProject.file('src/generated/resources'), "--existing", commonProject.file('src/main/resources')
var destinationProject = commonProject != null ? commonProject : project
var existingProject = commonProject != null ? commonProject : project
args '--mod', modId, '--all', '--output', destinationProject.file('src/generated/resources'), "--existing", existingProject.file('src/main/resources')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Data'
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraftVersion}-45.0.64"
minecraft "net.minecraftforge:forge:${minecraftVersion}-${forgeVersion}"
apis.collect {
implementation project(it)
}
compileApis.collect {
implementation project(it)
}
implementation commonProject
if (commonProject != null) {
implementation commonProject
}
}
sourceSets {
main.resources.srcDirs += 'src/generated/resources'
}
processResources {
from commonProject.sourceSets.main.resources
if (commonProject != null) {
from commonProject.sourceSets.main.resources
}
from project.sourceSets.main.resources
}
tasks.withType(JavaCompile) {
apis.collect {
Expand All @@ -208,12 +243,14 @@ subprojects {
compileApis.collect {
source(project(it).sourceSets.main.allSource)
}
source(commonProject.sourceSets.main.allSource)
if (commonProject != null) {
source(commonProject.sourceSets.main.allSource)
}
}
jar.finalizedBy('reobfJar')
}

ext.fabricProject = { String modId, Project commonProject, ArrayList apis = [], ArrayList compileApis = [] ->
ext.fabricProject = { String modId, Project commonProject = null, ArrayList apis = [], ArrayList compileApis = [] ->
repositories {
maven {
name = 'Parchment'
Expand All @@ -227,25 +264,32 @@ subprojects {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.19.3:2023.03.12@zip")
}
modImplementation "net.fabricmc:fabric-loader:0.14.21"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.82.0+1.19.4"
modImplementation "net.fabricmc:fabric-loader:${fabricLoaderVersion}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}"
apis.collect {
implementation project(it)
include project(it)
}
compileApis.collect {
implementation project(it)
}
implementation commonProject
if (commonProject != null) {
implementation commonProject
}
}
processResources {
from commonProject.sourceSets.main.resources
if (commonProject != null) {
from commonProject.sourceSets.main.resources
}
from project.sourceSets.main.resources
}
tasks.withType(JavaCompile) {
compileApis.collect {
source(project(it).sourceSets.main.allSource)
}
source(commonProject.sourceSets.main.allSource)
if (commonProject != null) {
source(commonProject.sourceSets.main.allSource)
}
}
jar {
from '../LICENSE.md'
Expand Down
8 changes: 4 additions & 4 deletions refinedarchitect-catalog-platform-fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ catalog {
library("jei-api", "mezz.jei", "jei-${minecraftVersion}-fabric-api").version(jeiVersion)
library("jei-impl", "mezz.jei", "jei-${minecraftVersion}-fabric").version(jeiVersion)

// https://www.curseforge.com/minecraft/mc-mods/modmenu/files
def modmenu = version("modmenu", "6.2.2")
// https://modrinth.com/mod/modmenu
def modmenu = version("modmenu", "7.1.0")
library("modmenu", "com.terraformersmc", "modmenu").versionRef(modmenu)

// https://www.curseforge.com/minecraft/mc-mods/wthit/files
def wthit = version("wthit", "fabric-7.3.1")
def wthit = version("wthit", "fabric-8.1.1")
library("wthit", "mcp.mobius.waila", "wthit").versionRef(wthit)

// https://www.curseforge.com/minecraft/mc-mods/no-indium/files
def noIndium = version("noIndium", "1.1.0+1.19.4")
def noIndium = version("noIndium", "1.1.0+1.20")
library("noIndium", "me.luligabi", "NoIndium").versionRef(noIndium)
}
}
Expand Down

0 comments on commit dda4663

Please sign in to comment.