Skip to content

Commit

Permalink
Add language file linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Dec 2, 2024
1 parent 0b2160f commit 42b6fe9
Show file tree
Hide file tree
Showing 17 changed files with 1,476 additions and 1,224 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- run: ./gradlew test --stacktrace --no-daemon
- run: ./gradlew check --stacktrace --no-daemon
- run: ./gradlew build -Pmod_version="$(git describe --always --tags | cut -c2-)" --stacktrace --no-daemon
- uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- run: ./gradlew test --stacktrace --no-daemon
- run: ./gradlew check --stacktrace --no-daemon
- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import net.earthcomputer.clientcommands.buildscript.CheckLanguageFilesTask

plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
id 'com.modrinth.minotaur' version '2.+'
id 'com.github.breadmoirai.github-release' version '2.4.1'
Expand Down Expand Up @@ -130,6 +132,11 @@ tasks.register('codeGen', JavaExec) {
enableAssertions = true
}

tasks.register('checkLanguageFiles', CheckLanguageFilesTask) {
inputDir.set(file('src/main/resources/assets/clientcommands/lang'))
}
check.dependsOn checkLanguageFiles

// read the changelog from the changelog.txt file, make sure the changelog is recent to avoid accidentally using the previous version's changelog.
def changelogFile = file('changelog.txt')
def changelogText = changelogFile.exists() && System.currentTimeMillis() - changelogFile.lastModified() <= 1000 * 60 * 60 ?
Expand Down
11 changes: 11 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
}

dependencies {
implementation("com.google.code.gson:gson:2.11.0")
}
Loading

0 comments on commit 42b6fe9

Please sign in to comment.