Skip to content

Commit

Permalink
1.20.2 (#119)
Browse files Browse the repository at this point in the history
* 1.20.2 Neoforge
  • Loading branch information
shartte authored Dec 6, 2023
1 parent e28c64a commit ff5ddc9
Show file tree
Hide file tree
Showing 1,408 changed files with 1,643 additions and 5,303 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Validate AW
run: ./gradlew validateAccessWidener
- name: Build with Gradle
run: ./gradlew build
env:
Expand All @@ -36,5 +34,5 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: powah ${{ steps.var.outputs.commit_hash }} [FORGE]
path: forge/build/libs/Powah-git-${{ steps.var.outputs.commit_hash }}.jar
name: powah ${{ steps.var.outputs.commit_hash }} [NEOFORGE]
path: neoforge/build/libs/Powah-git-${{ steps.var.outputs.commit_hash }}.jar
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
CHANGELOG: ${{ github.event.release.body }}
CF_TOKEN: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_API_KEY }}
run: ./gradlew :fabric:publishUnified :forge:publishUnified
run: ./gradlew :fabric:publishUnified :neoforge:publishUnified
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ build

# other
eclipse
run
/runs
jars

# Files from Forge MDK
forge*changelog.txt

extra-mods-*

.cache
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ A tech mod that has Various ways to generate, store and transmit Forge Energy, f

[Please join the AE2 Discord for support, in the `#powah` channel.](https://discord.gg/Zd6t9ka7ne)

Powah! was originally created by owmii for Forge 1.14-1.16, and is now being maintained by Technici4n for Forge and Fabric since 1.18.
Powah! was originally created by owmii for Forge 1.14-1.16, and is now being maintained by Technici4n, for Fabric and Forge between 1.17 and 1.20.1, and for Neoforge since 1.20.2.

This is allowed by the LGPL license used by Powah!.

<!--<a href="https://www.curseforge.com/minecraft/mc-mods/powah" target="_blank"><img src="http://cf.way2muchnoise.eu/all_352656_downloads.svg" /> </a><a href="https://www.curseforge.com/minecraft/mc-mods/powah" target="_blank"><img src="http://cf.way2muchnoise.eu/versions/352656.svg" /> </a><a href="https://discord.gg/A8TP9JY" target="_blank"><img src="https://img.shields.io/discord/461794532422582282.svg" /></a>-->
248 changes: 150 additions & 98 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,137 +1,192 @@
import com.diffplug.spotless.FormatterFunc
import com.diffplug.spotless.FormatterStep
import com.google.gson.Gson
import com.google.gson.GsonBuilder

plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id 'com.diffplug.spotless' version '5.14.0'
id "java-library"
id "net.neoforged.gradle.userdev"
id "me.shedaniel.unified-publishing"
id "com.diffplug.spotless"
id "maven-publish"
}

architectury {
minecraft = rootProject.minecraft_version
repositories {
maven {
url = "https://maven.theillusivec4.top"
content {
includeGroup "top.theillusivec4.curios"
}
}
maven {
name 'modmaven'
url "https://modmaven.dev/"
content {
includeGroup "mezz.jei"
}
}
maven {
url "https://maven.shedaniel.me"
content {
includeGroup "me.shedaniel"
includeGroup "me.shedaniel.cloth"
includeGroup "dev.architectury"
}
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/releases/"
content {
includeGroup "dev.emi"
}
}
}

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "me.shedaniel.unified-publishing"
apply plugin: "me.shedaniel.unified-publishing"

repositories {
maven { url "https://maven.parchmentmc.org" } //Parchment
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
dependencies {
implementation "net.neoforged:neoforge:${project.neoforge_version}"

loom {
silentMojangMappingsLicense()
}
implementation "me.shedaniel.cloth:cloth-config-neoforge:${project.cloth_config_version}"

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.18.2:2022.05.22@zip")
})
}
// Uncomment when we stop depending on REI internals
compileOnly "me.shedaniel:RoughlyEnoughItems-api-neoforge:${project.rei_version}"
compileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin-neoforge:${project.rei_version}"
implementation "me.shedaniel:RoughlyEnoughItems-neoforge:${project.rei_version}"
implementation "dev.architectury:architectury-neoforge:10.0.16"

compileOnly "top.theillusivec4.curios:curios-neoforge:${project.curios_version}:api"
//modRuntimeOnly "top.theillusivec4.curios:curios-forge:${project.curios_version}"
}

base {
archivesName = project.archives_base_name
}

architectury {
// Disable Architectury's injectables like @ExpectPlatform
// since we don't use them.
injectInjectables = false
version = (System.getenv("POWAH_VERSION") ?: "v0.0.0").substring(1)
group = project.maven_group

java {
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}

base {
archivesName = rootProject.archives_base_name
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}

version = (System.getenv("POWAH_VERSION") ?: "v0.0.0").substring(1)
group = rootProject.maven_group
sourceSets {
main {
resources {
srcDir "src/generated/resources"
}
}
}

repositories {
maven {
name 'modmaven'
url "https://modmaven.dev/"
content {
includeGroup "mezz.jei"
}
processResources {
inputs.property "version", project.version

filesMatching("META-INF/mods.toml") {
filter { line ->
line.replace 'version="0.0.0"', "version=\"$version\""
}
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
minecraft {
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')
}
}

java {
withSourcesJar()
runs {
configureEach {
modSource project.sourceSets.main
}
client
server
data {
programArguments = ['--mod', 'powah',
'--all',
'--output', file('src/generated/resources/').absolutePath,
'--existing', file('src/main/resources').absolutePath]
}
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
publishing {
publications {
maven(MavenPublication) {
artifactId = rootProject.archives_base_name
from components.java
}
}

if ((project.name == "fabric" || project.name == "forge") && project.version != "0.0.0") {
unifiedPublishing {
project {
gameVersions = [rootProject.minecraft_version]
gameLoaders = [project.name]
version = project.version + "-" + project.name

def releaseChannel = "release"
def changes = System.getenv("CHANGELOG") ?: "No changelog provided?"
if (project.version.toLowerCase().contains("alpha")) {
releaseChannel = "alpha"
changes = "THIS IS AN ALPHA RELEASE, MAKE A BACKUP BEFORE INSTALLING AND FREQUENTLY WHILE PLAYING, AND PLEASE REPORT ANY ISSUE YOU MAY FIND ON THE ISSUE TRACKER.\n\n" + changes
} else if (project.version.toLowerCase().contains("beta")) {
releaseChannel = "beta"
changes = "This is a beta release. It is expected to be mostly stable, but in any case please report any issue you may find.\n\n" + changes
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}

releaseType = releaseChannel
changelog = changes
displayName = String.format("[%s %s] v%s", project.name.toUpperCase(), rootProject.minecraft_version, project.version)
if (project.version != "0.0.0") {
unifiedPublishing {
project {
gameVersions = [project.minecraft_version]
gameLoaders = [project.name]
version = project.version + "-" + project.name

def releaseChannel = "release"
def changes = System.getenv("CHANGELOG") ?: "No changelog provided?"
if (project.version.toLowerCase().contains("alpha")) {
releaseChannel = "alpha"
changes = "THIS IS AN ALPHA RELEASE, MAKE A BACKUP BEFORE INSTALLING AND FREQUENTLY WHILE PLAYING, AND PLEASE REPORT ANY ISSUE YOU MAY FIND ON THE ISSUE TRACKER.\n\n" + changes
} else if (project.version.toLowerCase().contains("beta")) {
releaseChannel = "beta"
changes = "This is a beta release. It is expected to be mostly stable, but in any case please report any issue you may find.\n\n" + changes
}

mainPublication remapJar // Declares the publicated jar
releaseType = releaseChannel
changelog = changes
displayName = String.format("[%s %s] v%s", project.name.toUpperCase(), project.minecraft_version, project.version)

relations {
depends {
curseforge = "architectury-api"
modrinth = "architectury-api"
}
depends {
curseforge = "cloth-config"
modrinth = "cloth-config"
}
mainPublication jar // Declares the publicated jar

relations {
depends {
curseforge = "cloth-config"
modrinth = "cloth-config"
}
}

var cfToken = System.getenv("CF_TOKEN")
if (cfToken != null) {
curseforge {
token = cfToken
id = "633483" // Required, must be a string, ID of CurseForge project
var cfToken = System.getenv("CF_TOKEN")
if (cfToken != null) {
curseforge {
token = cfToken
id = "633483" // Required, must be a string, ID of CurseForge project

if (project.name == "fabric" && releaseChannel == "release") {
// Use beta channel for Fabric releases on CurseForge, to separate from Forge builds
releaseType = "beta"
}
if (project.name == "fabric" && releaseChannel == "release") {
// Use beta channel for Fabric releases on CurseForge, to separate from Forge builds
releaseType = "beta"
}
}
}

var mrToken = System.getenv("MODRINTH_TOKEN")
if (mrToken != null) {
modrinth {
token = mrToken
id = "KZO4S4DO" // Required, must be a string, ID of Modrinth project
}
var mrToken = System.getenv("MODRINTH_TOKEN")
if (mrToken != null) {
modrinth {
token = mrToken
id = "KZO4S4DO" // Required, must be a string, ID of Modrinth project
}
}
}
Expand Down Expand Up @@ -165,9 +220,6 @@ spotless {
}
}

import com.diffplug.spotless.FormatterFunc
import com.diffplug.spotless.FormatterStep

final class JsonOrderStep {
private JsonOrderStep() {}
private static final Gson GSON = new GsonBuilder().disableHtmlEscaping().setLenient().setPrettyPrinting().create();
Expand Down
42 changes: 0 additions & 42 deletions common/build.gradle

This file was deleted.

Loading

0 comments on commit ff5ddc9

Please sign in to comment.