-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
88 changed files
with
4,142 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
name-template: '$RESOLVED_VERSION' | ||
tag-template: '$RESOLVED_VERSION' | ||
--- | ||
name-template: "$RESOLVED_VERSION" | ||
tag-template: "$RESOLVED_VERSION" | ||
prerelease: true | ||
template: | | ||
# What's Changed | ||
$CHANGES | ||
categories: | ||
- title: Breaking | ||
label: breaking | ||
- title: New | ||
label: enhancement | ||
- title: Bug Fixes | ||
label: bug | ||
- title: Maintenance | ||
label: maintenance | ||
- title: Documentation | ||
label: documentation | ||
- title: Dependency Updates | ||
label: dependencies | ||
|
||
- title: "Breaking" | ||
label: "breaking" | ||
- title: "New" | ||
label: "enhancement" | ||
- title: "Bug Fixes" | ||
label: "bug" | ||
- title: "Maintenance" | ||
label: "maintenance" | ||
- title: "Documentation" | ||
label: "documentation" | ||
- title: "Dependency Updates" | ||
label: "dependencies" | ||
version-resolver: | ||
major: | ||
labels: | ||
- breaking | ||
- "breaking" | ||
minor: | ||
labels: | ||
- enhancement | ||
- "enhancement" | ||
patch: | ||
labels: | ||
- bug | ||
- maintenance | ||
- documentation | ||
- dependencies | ||
- security | ||
|
||
- "bug" | ||
- "maintenance" | ||
- "documentation" | ||
- "dependencies" | ||
- "security" | ||
exclude-labels: | ||
- skip-changelog | ||
- "skip-changelog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
name: Build | ||
|
||
on: | ||
--- | ||
name: "Build" | ||
"on": | ||
pull_request: | ||
branches: [ master ] | ||
|
||
branches: | ||
- "master" | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
name: "Build" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
- run: | | ||
chmod +x gradlew | ||
./gradlew build | ||
- uses: "actions/checkout@v4" | ||
- uses: "actions/setup-java@v4" | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
- uses: "actions/cache@v4" | ||
with: | ||
path: "~/.gradle/caches" | ||
key: "${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}" | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: "actions/cache@v4" | ||
with: | ||
path: "~/.gradle/wrapper" | ||
key: "${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}" | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
- run: | | ||
chmod +x gradlew | ||
./gradlew build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: Update Changelog | ||
|
||
on: | ||
--- | ||
name: "Update Changelog" | ||
"on": | ||
push: | ||
branches: [ master ] | ||
|
||
branches: | ||
- "master" | ||
jobs: | ||
changelog: | ||
name: Update Changelog | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, 'skip-snapshot') }} | ||
name: "Update Changelog" | ||
runs-on: "ubuntu-latest" | ||
if: "${{ !contains(github.event.head_commit.message, 'skip-snapshot') }}" | ||
steps: | ||
- uses: release-drafter/release-drafter@master | ||
id: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: "release-drafter/release-drafter@master" | ||
id: "release" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
name: Release | ||
on: | ||
--- | ||
name: "Release" | ||
"on": | ||
release: | ||
types: | ||
- released | ||
- "released" | ||
jobs: | ||
build: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
name: "Release" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
- run: | | ||
[[ "${{ github.event.release.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1 | ||
chmod +x gradlew | ||
./gradlew -Psign-required=true publish -Pversion="${{ github.event.release.tag_name }}" -PmavenCentralUsername="${{ secrets.MAVEN_CENTRAL_USERNAME }}" -PmavenCentralPassword="${{ secrets.MAVEN_CENTRAL_PASSWORD }}" -PsigningInMemoryKey="${{ secrets.GPG_PRIVATE_KEY_ARMORED }}" -PsigningInMemoryKeyPassword="${{ secrets.GPG_PASSPHRASE }}" | ||
- uses: "actions/checkout@v4" | ||
- uses: "actions/setup-java@v4" | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
- uses: "actions/cache@v4" | ||
with: | ||
path: "~/.gradle/caches" | ||
key: "${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}" | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: "actions/cache@v4" | ||
with: | ||
path: "~/.gradle/wrapper" | ||
key: "${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}" | ||
restore-keys: | | ||
${{ runner.os }}-gradlew- | ||
- run: | | ||
[[ "${{ github.event.release.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1 | ||
chmod +x gradlew | ||
./gradlew -Psign-required=true publish -Pversion="${{ github.event.release.tag_name }}" -PmavenCentralUsername="${{ secrets.MAVEN_CENTRAL_USERNAME }}" -PmavenCentralPassword="${{ secrets.MAVEN_CENTRAL_PASSWORD }}" -PsigningInMemoryKey="${{ secrets.GPG_PRIVATE_KEY_ARMORED }}" -PsigningInMemoryKeyPassword="${{ secrets.GPG_PASSPHRASE }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import net.infumia.gradle.publish | ||
|
||
publish("blank") | ||
|
||
dependencies { | ||
compileOnly(project(":common")) | ||
|
||
compileOnly(libs.creative.api) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package net.infumia.pack; | ||
|
||
import net.kyori.adventure.key.Key; | ||
import net.kyori.adventure.key.KeyPattern; | ||
import team.unnamed.creative.base.Writable; | ||
|
||
/** | ||
* Utility class for creating and retrieving blank slot file resources. | ||
*/ | ||
public final class BlankSlot { | ||
|
||
/** | ||
* Retrieves a pre-configured blank slot file resource. | ||
* | ||
* @return A {@link FileResource} representing the blank slot. | ||
*/ | ||
public static FileResource get() { | ||
return Internal0.BLANK_SLOT.get(); | ||
} | ||
|
||
/** | ||
* Creates a blank slot file resource with the specified parameters. | ||
* | ||
* @param namespace The namespace for the model. Cannot be null. | ||
* @param itemId The id for the item. Cannot be null. | ||
* @param baseKey The key for the base model. Cannot be null. | ||
* @param blankSlotImage The writable image for the blank slot. Cannot be null. | ||
* @param customModelData The custom model data value. | ||
* @return A {@link FileResource} representing the created blank slot. | ||
*/ | ||
public static FileResource create( | ||
@KeyPattern.Namespace final String namespace, | ||
@KeyPattern.Value final String itemId, | ||
final Key baseKey, | ||
final Writable blankSlotImage, | ||
final int customModelData | ||
) { | ||
return ResourceProducers.item( | ||
Key.key(namespace, itemId), | ||
baseKey, | ||
blankSlotImage, | ||
customModelData | ||
); | ||
} | ||
|
||
private BlankSlot() { | ||
throw new IllegalStateException("Utility class"); | ||
} | ||
|
||
private static final class Internal0 { | ||
|
||
private static final Lazy<FileResource> BLANK_SLOT = Lazy.of( | ||
() -> | ||
BlankSlot.create( | ||
Internal.DEFAULT_NAMESPACE, | ||
"blank_slot", | ||
Key.key("item/paper"), | ||
Internal.resourceFromJar("blank_slot.png"), | ||
1 | ||
) | ||
); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,7 @@ | ||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import com.vanniktech.maven.publish.MavenPublishPlugin | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import net.infumia.gradle.spotless | ||
|
||
plugins { | ||
java | ||
alias(libs.plugins.nexus) apply false | ||
} | ||
plugins { java } | ||
|
||
repositories.mavenCentral() | ||
subprojects { apply<JavaPlugin>() } | ||
|
||
subprojects { | ||
apply<JavaPlugin>() | ||
apply<MavenPublishPlugin>() | ||
|
||
repositories.mavenCentral() | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
} | ||
|
||
tasks { | ||
val javadocJar by creating(Jar::class) { | ||
dependsOn("javadoc") | ||
archiveClassifier.set("javadoc") | ||
from(javadoc) | ||
} | ||
|
||
val sourcesJar by creating(Jar::class) { | ||
dependsOn("classes") | ||
archiveClassifier.set("sources") | ||
from(sourceSets["main"].allSource) | ||
} | ||
} | ||
|
||
val moduleName = project.findProperty("artifact-id") as String? | ||
val projectName = "pack${if (moduleName == null) "" else "-$moduleName"}" | ||
val signRequired = project.hasProperty("sign-required") | ||
|
||
extensions.configure<MavenPublishBaseExtension> { | ||
coordinates(project.group.toString(), projectName, project.version.toString()) | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true) | ||
if (signRequired) { | ||
signAllPublications() | ||
} | ||
|
||
pom { | ||
name.set(projectName) | ||
description.set("Minecraft resource pack generator.") | ||
url.set("https://github.com/Infumia/pack") | ||
licenses { | ||
license { | ||
name.set("MIT License") | ||
url.set("https://mit-license.org/license.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("portlek") | ||
name.set("Hasan Demirtaş") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:git://github.com/infumia/pack.git") | ||
developerConnection.set("scm:git:ssh://github.com/infumia/pack.git") | ||
url.set("https://github.com/infumia/pack/") | ||
} | ||
} | ||
} | ||
} | ||
spotless() |
Oops, something went wrong.