Skip to content

Commit

Permalink
Merge branch '1.17.x/dev' into 1.17.x/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed May 16, 2022
2 parents 5f90059 + ba5ec13 commit 07a9604
Show file tree
Hide file tree
Showing 36 changed files with 446 additions and 239 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ jobs:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Upload assets to GitHub
run: ./gradlew build
- name: Upload assets to releases
run: ./gradlew build publishAllPublicationsToFlashyReeseReleasesRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
BUILD_RELEASE: ${{ github.event.prerelease == false }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/[email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Java CI with Gradle

on: [ push, pull_request ]
on: [ pull_request ]

jobs:
build:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Java CI with Gradle

on: [ push ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build publishAllPublicationsToFlashyReeseSnapshotsRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
name: build-artifacts
path: build/libs
61 changes: 52 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'org.ajoberstar.grgit' version '5.0.0'
id 'signing'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.6.1'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = "${project.archives_base_name}-mc${project.minecraft_version}"
version = project.mod_version
archivesBaseName = project.archives_base_name
version = "${project.mod_version}+mc${project.minecraft_version}-${getVersionMetadata()}"
group = project.maven_group

loom {
accessWidenerPath = file("src/main/resources/sodium-extra.accesswidener")
}

repositories {
maven { url 'https://jitpack.io' }
maven {
Expand All @@ -24,6 +22,12 @@ repositories {
includeGroup "maven.modrinth"
}
}
maven {
url "https://maven.flashyreese.me/releases"
}
maven {
url "https://maven.flashyreese.me/snapshots"
}
}

dependencies {
Expand All @@ -33,7 +37,7 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "maven.modrinth:sodium:${project.sodium_version}"
modImplementation "maven.modrinth:reeses-sodium-options:${project.reeses_sodium_options}"
modImplementation "me.flashyreese.mods:reeses-sodium-options:${project.reeses_sodium_options}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation "org.joml:joml:1.10.2"

Expand Down Expand Up @@ -92,6 +96,45 @@ publishing {
// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
maven {
name = "FlashyReeseReleases"
url = "https://maven.flashyreese.me/releases"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "FlashyReeseSnapshots"
url = "https://maven.flashyreese.me/snapshots"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}

def getVersionMetadata() {
def build_id = System.getenv("GITHUB_RUN_NUMBER")

// CI builds only
if (build_id != null) {
return "build.${build_id}"
}

if (grgit != null) {
def head = grgit.head()
def id = head.abbreviatedId

// Flag the build if the build tree is not clean
if (!grgit.status().clean) {
id += "-dirty"
}

return "rev.${id}"
}

// No tracking information could be found about the build
return "unknown"
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.65
loader_version=0.13.3
loader_version=0.14.4

# Mod Properties
mod_version=0.4.3
mod_version=0.4.4
maven_group=me.flashyreese.mods
archives_base_name=sodium-extra

# Dependencies
reeses_sodium_options=mc1.17.1-1.4.2
reeses_sodium_options=1.4.2+mc1.17.1-build.10
sodium_version=mc1.17.1-0.3.4
fabric_version=0.46.1+1.17
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down
Loading

0 comments on commit 07a9604

Please sign in to comment.