Skip to content

Commit

Permalink
Move to Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
theogiraudet authored Oct 12, 2024
1 parent db7d428 commit 9063e28
Show file tree
Hide file tree
Showing 20 changed files with 927 additions and 96 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

6 changes: 4 additions & 2 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
distribution: 'temurin'
java-version: '21'
- run: |
bash extract.sh ${{ inputs.version }}
chmod +x ./gradlew
./gradlew build -Pversion=${{ inputs.version }}
./gradlew run -Pversion=${{ inputs.version }}
git checkout --orphan temp
cp -r "generated/${{ inputs.version }}/"* .
git clean -fdX
rm -r .github/ src/ extract.sh .gitignore
rm -r .github/ src/ gradle/ .gitignore .gitattributes build.gradle gradle.properties gradlew gradlew.bat settings.gradle .run
git add .
git commit -m "🚀 Update generated contents for ${{ inputs.version }}"
git tag -f "${{ inputs.version }}"
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- uses: gradle/gradle-build-action@v2
- run: |
bash extract.sh ${{ needs.check.outputs.id }}
chmod +x ./gradlew
./gradlew build -Pversion=${{ needs.check.outputs.id }}
./gradlew run -Pversion=${{ needs.check.outputs.id }}
git checkout --orphan temp
cp -r "generated/${{ needs.check.outputs.id }}/"* .
git clean -fdX
rm -r .github/ src/ extract.sh .gitignore
rm -r .github/ src/ gradle/ .gitignore .gitattributes build.gradle gradle.properties gradlew gradlew.bat settings.gradle .run
git add .
git commit -m "🚀 Update generated contents for ${{ needs.check.outputs.id }}"
git tag -f "${{ needs.check.outputs.id }}"
Expand Down
50 changes: 45 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
build
generated
logs
tools
versions
# gradle

.gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/

# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr

generated/
logs/
tools/
versions/
24 changes: 24 additions & 0 deletions .run/Bookshelf-McData [build].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Bookshelf-McData [build]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-Pversion=1.21.2-pre3" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="build" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/Bookshelf-McData [run].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Bookshelf-McData [run]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-Pversion=1.21.2-pre3" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="run" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
16 changes: 16 additions & 0 deletions .run/Extractor.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Extractor" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="net.gunivers.bookshelf.Extractor" />
<module name="Bookshelf-McData.main" />
<option name="PROGRAM_PARAMETERS" value="1.21.2-pre3" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="net.gunivers.bookshelf.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
Loading

0 comments on commit 9063e28

Please sign in to comment.