Skip to content

Commit 29ab314

Browse files
authored
Merge pull request #255 from FTBTeam/dev
Dev
2 parents dee8d56 + 714bbc8 commit 29ab314

File tree

67 files changed

+864
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+864
-823
lines changed

.github/workflows/build.yml

+12-37
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,23 @@
1-
name: Java CI
1+
name: Java CI - Build on Push
22

33
on:
44
push:
5-
branches:
6-
# main and dev versions for each mc ver here
7-
- "1.19/main"
8-
- "1.19/dev"
5+
branches: [ main, dev, "1.*" ]
96
workflow_dispatch:
107
inputs:
11-
norelease:
12-
description: 'Do not publish'
8+
skip_maven_publish:
9+
description: 'Skip Maven publishing'
1310
required: true
1411
default: 'false'
1512

1613
jobs:
1714
build:
18-
runs-on: ubuntu-latest
1915
if: |
20-
!contains(github.event.head_commit.message, '[ci skip]')
21-
steps:
22-
- uses: actions/checkout@v3
23-
with:
24-
fetch-depth: 30 # Gets the last 30 commits so the changelog might work
25-
- name: Set up JDK 17
26-
uses: actions/setup-java@v3
27-
with:
28-
distribution: 'temurin'
29-
java-version: '17'
30-
- name: Validate Gradle Wrapper
31-
uses: gradle/wrapper-validation-action@v1
32-
- name: Build and Publish with Gradle
33-
uses: gradle/gradle-build-action@v2
34-
env:
35-
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }}
36-
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }}
37-
with:
38-
arguments: build publish --stacktrace --no-daemon
39-
- name: Release to CurseForge
40-
uses: gradle/gradle-build-action@v2
41-
if: |
42-
contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true'
43-
env:
44-
GIT_COMMIT: ${{ github.event.after }}
45-
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
46-
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
47-
with:
48-
arguments: build curseforge --stacktrace --no-daemon
16+
!contains(github.event.head_commit.message, '[ciskip]')
17+
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
18+
with:
19+
curse-publish-task: ""
20+
maven-snapshots: true
21+
secrets:
22+
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
23+
saps-token: ${{ secrets.SAPS_TOKEN }}

.github/workflows/release.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Java CI - Build Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
build:
9+
if: |
10+
!contains(github.event.head_commit.message, '[ciskip]')
11+
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
12+
with:
13+
curse-publish-task: curseforge
14+
secrets:
15+
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
16+
saps-token: ${{ secrets.SAPS_TOKEN }}
17+
curse-token: ${{ secrets.CURSEFORGE_KEY }}

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2001.1.2]
8+
9+
### Added
10+
* Updated to MC 1.20.1, based on 1902.3.22 release
11+
712
## [1902.3.22]
813

914
### Added

build.gradle

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "architectury-plugin" version "3.4-SNAPSHOT"
3-
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
3+
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false
44
}
55

66
architectury {
@@ -26,11 +26,13 @@ allprojects {
2626
apply plugin: "maven-publish"
2727
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/git-md-changelog.gradle"
2828

29-
def ENV = System.getenv()
30-
version = "${mod_version}-build.${ENV.GITHUB_RUN_NUMBER ?: 9999}"
29+
version = project.mod_version
3130
group = project.maven_group
3231
archivesBaseName = project.archives_base_name
3332

33+
// needs to be done AFTER version is set
34+
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/publishing.gradle"
35+
3436
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = 17
3537

3638
compileJava {
@@ -51,7 +53,14 @@ allprojects {
5153
}
5254

5355
maven {
54-
url "https://maven.saps.dev/minecraft"
56+
url "https://maven.saps.dev/releases"
57+
content {
58+
includeGroup "dev.latvian.mods"
59+
includeGroup "dev.ftb.mods"
60+
}
61+
}
62+
maven {
63+
url "https://maven.saps.dev/snapshots"
5564
content {
5665
includeGroup "dev.latvian.mods"
5766
includeGroup "dev.ftb.mods"

common/build.gradle

+11-10
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,30 @@ artifacts {
3131

3232
publishing {
3333
publications {
34-
mavenCommon(MavenPublication) {
35-
artifactId = rootProject.archivesBaseName
34+
mavenForge(MavenPublication) {
35+
artifactId = "${rootProject.archives_base_name}"
36+
version ftbPublishing.mavenVersion
3637
from components.java
3738
}
3839
}
3940

4041
repositories {
41-
if (ENV.FTB_MAVEN_TOKEN) {
42+
if (ftbPublishing.ftbToken) {
4243
maven {
43-
url "https://maven.ftb.dev/release"
44+
url ftbPublishing.ftbURL
4445
credentials {
45-
username = "ftb"
46-
password = "${ENV.FTB_MAVEN_TOKEN}"
46+
username = ftbPublishing.ftbUser
47+
password = ftbPublishing.ftbToken
4748
}
4849
}
4950
}
5051

51-
if (ENV.SAPS_TOKEN) {
52+
if (ftbPublishing.sapsToken) {
5253
maven {
53-
url "https://maven.saps.dev/minecraft"
54+
url ftbPublishing.sapsURL
5455
credentials {
55-
username = "ftb"
56-
password = "${ENV.SAPS_TOKEN}"
56+
username = ftbPublishing.sapsUser
57+
password = ftbPublishing.sapsToken
5758
}
5859
}
5960
}

common/src/main/java/dev/ftb/mods/ftbchunks/ColorMapLoader.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ protected void apply(JsonObject object, ResourceManager resourceManager, Profile
7979
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(0x683A2D)));
8080
} else if (FTBCUtils.isRail(block)) {
8181
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(0x888888)));
82-
} else if (block.defaultMaterialColor() != null) {
83-
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(block.defaultMaterialColor().col)));
82+
} else if (block.defaultMapColor() != null) {
83+
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(block.defaultMapColor().col)));
8484
} else {
8585
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.RED));
8686
}

0 commit comments

Comments
 (0)