Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Aug 18, 2024
1 parent 0e4cdaf commit 4fd5f18
Show file tree
Hide file tree
Showing 13 changed files with 112 additions and 457 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on: [ pull_request, push, workflow_dispatch ]

jobs:
Build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get github short hash
id: github_short_hash
run: echo "result=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand All @@ -28,13 +28,10 @@ jobs:
run: |
chmod +x gradlew
./gradlew build
- name: Upload artifacts (fabric)
uses: actions/upload-artifact@v3
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts-fabric
path: ${{ github.workspace }}/fabric/build/libs
- name: Upload artifacts (neoforge)
uses: actions/upload-artifact@v3
with:
name: Artifacts-neoforge
path: ${{ github.workspace }}/neoforge/build/libs
name: Artifacts
path: |
${{ github.workspace }}/fabric/build/libs
${{ github.workspace }}/neoforge/build/libs
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 20
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 20
java-version: 17
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/actions/wrapper-validation@v3
- run: |
chmod +x gradlew
./gradlew build publishMod --stacktrace -Porg.gradle.parallel.threads=4
Expand Down
60 changes: 45 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,72 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "com.hypherionmc.modutils.modpublisher" version "2.+" apply false
id "com.github.johnrengelman.shadow" version "8.+" apply false
}

architectury {
minecraft = rootProject.minecraft_version
}

allprojects {
version = "${rootProject.mod_version}+mc${rootProject.minecraft_version}"
group = rootProject.maven_group
}

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "com.hypherionmc.modutils.modpublisher"

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2"
}
}

allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name
version = "${rootProject.mod_version}+mc${rootProject.minecraft_version}"
group = rootProject.maven_group
base.archivesName = "${rootProject.archives_base_name}-${project.name}"

repositories {
maven { url = "https://maven.quiltmc.org/repository/release/" }
}

tasks.withType(JavaCompile) {
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2"

implementation "org.quiltmc:quilt-config:${rootProject.quiltconfig_version}"
implementation "org.quiltmc.parsers:json:${rootProject.quiltparsers_version}"
implementation "org.quiltmc.quilt-config.serializers:toml:${rootProject.quiltconfig_version}"
implementation "org.quiltmc.quilt-config.serializers:json5:${rootProject.quiltconfig_version}"
}

tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release = 17
}

java {
withSourcesJar()

toolchain {
languageVersion = JavaLanguageVersion.of(17)
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

// Configure Maven publishing.
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = base.archivesName.get()
from components.java
}
}

// 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.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
}
19 changes: 0 additions & 19 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,4 @@ dependencies {
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"

implementation "org.quiltmc:quilt-config:${rootProject.quiltconfig_version}"
implementation "org.quiltmc.parsers:json:${rootProject.quiltparsers_version}"
implementation "org.quiltmc.quilt-config.serializers:toml:${rootProject.quiltconfig_version}"
implementation "org.quiltmc.quilt-config.serializers:json5:${rootProject.quiltconfig_version}"
}

publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archives_base_name
from components.java
}
}

// 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.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package ho.artisan.azusaconfig.api.config.v2;
package ho.artisan.azusaconfig.api;

import ho.artisan.azusaconfig.impl.config.AzusaConfigImpl;
import ho.artisan.azusaconfig.impl.AzusaConfigImpl;
import org.quiltmc.config.api.Config;
import org.quiltmc.config.api.ReflectiveConfig;
import org.quiltmc.config.impl.ConfigImpl;
Expand Down
Loading

0 comments on commit 4fd5f18

Please sign in to comment.