Skip to content

Commit

Permalink
intim
Browse files Browse the repository at this point in the history
  • Loading branch information
fghjk455rg committed Sep 29, 2024
1 parent ec107dc commit 3afd16e
Show file tree
Hide file tree
Showing 105 changed files with 949 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/commitTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build Mod

on: [push, pull_request]

jobs:
buildJar:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up PATH
run: |
echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build mod jar
run: |
chmod +x gradlew
./gradlew deploy
- name: Upload built jar file
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}
path: build/libs/${{ github.event.repository.name }}.jar
156 changes: 156 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
logs/
/core/assets/mindustry-saves/
/core/assets/mindustry-maps/
/core/assets/bundles/output/
/core/assets/.gifimages/
/deploy/
/desktop/packr-out/
/desktop/packr-export/
/desktop/mindustry-saves/
/desktop/mindustry-maps/
/desktop/gifexport/
/core/lib/
/ios/assets/
/core/assets-raw/sprites/generated/
/core/assets-raw/sprites_out/
/annotations/build/
/annotations/out/
/net/build/
/tools/build/
/tests/build/
/server/build/
/test_files/
/annotations/build/
/desktop-sdl/build/
desktop-sdl/build/
/android/assets/mindustry-maps/
/android/assets/mindustry-saves/
/core/assets/gifexport/
/core/assets/version.properties
/core/assets/locales
/ios/src/io/anuke/mindustry/gen/
/core/src/io/anuke/mindustry/gen/
ios/robovm.properties
packr-out/
config/
*.gif

version.properties

.attach_*
## Java

*.class
*.war
*.ear
hs_err_pid*
crash-report-*

## Robovm
/ios/robovm-build/

## GWT
/html/war/
/html/gwt-unitCache/
.apt_generated/
.gwt/
gwt-unitCache/
www-test/
.gwt-tmp/

## Android Studio and Intellij and Android in general
/android/libs/armeabi/
/android/libs/armeabi-v7a/
/android/libs/arm64-v8a/
/android/libs/x86/
/android/libs/x86_64/
/android/gen/
.idea/
*.ipr
*.iws
*.iml
/android/out/
com_crashlytics_export_strings.xml

## Eclipse

.classpath
.project
.metadata/
/android/bin/
/core/bin/
/desktop/bin/
/html/bin/
/ios/bin/
/ios-moe/bin/
*.tmp
*.bak
*.swp
*~.nib
.settings/
.loadpath
.externalToolBuilders/
*.launch

## NetBeans

/nbproject/private/
/android/nbproject/private/
/core/nbproject/private/
/desktop/nbproject/private/
/html/nbproject/private/
/ios/nbproject/private/
/ios-moe/nbproject/private/

/build/
/android/build/
/core/build/
/desktop/build/
/html/build/
/ios/build/
/ios-moe/build/

/nbbuild/
/android/nbbuild/
/core/nbbuild/
/desktop/nbbuild/
/html/nbbuild/
/ios/nbbuild/
/ios-moe/nbbuild/

/dist/
/android/dist/
/core/dist/
/desktop/dist/
/html/dist/
/ios/dist/
/ios-moe/dist/

/nbdist/
/android/nbdist/
/core/nbdist/
/desktop/nbdist/
/html/nbdist/
/ios/nbdist/
/ios-moe/nbdist/

nbactions.xml
nb-configuration.xml

## Gradle

/local.properties
.gradle/
gradle-app.setting
/build/
/android/build/
/core/build/
/desktop/build/
/html/build/
/ios/build/
/ios-moe/build/

## OS Specific
.DS_Store
Thumbs.db
android/libs/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# A Java Mindustry mod.
Enless's, and music by Saigo.
Still in development.
Empty file.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sounds/ui/chatMessage.ogg
Binary file not shown.
Binary file added assets/sounds/ui/message.ogg
Binary file not shown.
Binary file added assets/sounds/ui/unlock.ogg
Binary file not shown.
Binary file added assets/sprites-override/ui/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/blocks/crafting/nilver-smelter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/blocks/distribution/heavy-bridge.png
Binary file added assets/sprites/blocks/distribution/heavy-router.png
Binary file added assets/sprites/blocks/distribution/heavy-sorter.png
Binary file added assets/sprites/blocks/effect/core-colony-team.png
Binary file added assets/sprites/blocks/effect/core-colony.png
Binary file added assets/sprites/blocks/environment/acidfloor.png
Binary file added assets/sprites/blocks/environment/ore/cu1.png
Binary file added assets/sprites/blocks/environment/ore/cu2.png
Binary file added assets/sprites/blocks/environment/ore/cu3.png
Binary file added assets/sprites/blocks/environment/ore/zn1.png
Binary file added assets/sprites/blocks/environment/ore/zn2.png
Binary file added assets/sprites/blocks/environment/ore/zn3.png
Binary file added assets/sprites/blocks/environment/ore/zn4.png
Binary file added assets/sprites/blocks/environment/silent-sand.png
Binary file added assets/sprites/blocks/environment/silent-water.png
Binary file added assets/sprites/blocks/environment/slate0.png
Binary file added assets/sprites/blocks/environment/slate1.png
Binary file added assets/sprites/blocks/environment/slate2.png
Binary file added assets/sprites/blocks/environment/slate3.png
Binary file added assets/sprites/blocks/environment/slate4.png
Binary file added assets/sprites/blocks/environment/slate5.png
Binary file added assets/sprites/blocks/liquid/conduits/1pipe-cap.png
Binary file added assets/sprites/blocks/liquid/liquidx.png
Binary file added assets/sprites/blocks/liquid/pipebridge-arrow.png
Binary file added assets/sprites/blocks/liquid/pipebridge-bridge.png
Binary file added assets/sprites/blocks/liquid/pipebridge-end.png
Binary file added assets/sprites/blocks/liquid/pipebridge.png
Binary file added assets/sprites/blocks/liquid/piperouter-bottom.png
Binary file added assets/sprites/blocks/liquid/piperouter-liquid.png
Binary file added assets/sprites/blocks/liquid/piperouter.png
Binary file added assets/sprites/blocks/production/steam-drill-top.png
Binary file added assets/sprites/blocks/production/steam-drill.png
Binary file added assets/sprites/items/acid.png
Binary file added assets/sprites/items/aluminum.png
Binary file added assets/sprites/items/krinite.png
Binary file added assets/sprites/items/ortoplastid.png
Binary file added assets/sprites/items/pulsealloy.png
Binary file added assets/sprites/items/quartz.png
Binary file added assets/sprites/items/sulphur.png
Binary file added assets/sprites/units/alebastr-cell.png
Binary file added assets/sprites/units/alebastr.png
100 changes: 100 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
apply plugin: "java"

version '1.0'

sourceSets.main.java.srcDirs = ["src"]

repositories{
mavenCentral()
maven{ url "https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository" }
maven{ url 'https://www.jitpack.io' }
}

java{
targetCompatibility = 8
sourceCompatibility = JavaVersion.VERSION_17
}

ext{
//the build number that this mod is made for
mindustryVersion = 'v145'
jabelVersion = "93fde537c7"
//windows sucks
isWindows = System.getProperty("os.name").toLowerCase().contains("windows")
sdkRoot = System.getenv("ANDROID_HOME") ?: System.getenv("ANDROID_SDK_ROOT")
}

//java 8 backwards compatibility flag
allprojects{
tasks.withType(JavaCompile){
options.compilerArgs.addAll(['--release', '8'])
}
}

dependencies{
compileOnly "com.github.Anuken.Arc:arc-core:$mindustryVersion"
compileOnly "com.github.Anuken.Mindustry:core:$mindustryVersion"

annotationProcessor "com.github.Anuken:jabel:$jabelVersion"
}

//force arc version
configurations.all{
resolutionStrategy.eachDependency { details ->
if(details.requested.group == 'com.github.Anuken.Arc'){
details.useVersion "$mindustryVersion"
}
}
}

task jarAndroid{
dependsOn "jar"

doLast{
if(!sdkRoot || !new File(sdkRoot).exists()) throw new GradleException("No valid Android SDK found. Ensure that ANDROID_HOME is set to your Android SDK directory.");

def platformRoot = new File("$sdkRoot/platforms/").listFiles().sort().reverse().find{ f -> new File(f, "android.jar").exists()}

if(!platformRoot) throw new GradleException("No android.jar found. Ensure that you have an Android platform installed.")

//collect dependencies needed for desugaring
def dependencies = (configurations.compileClasspath.asList() + configurations.runtimeClasspath.asList() + [new File(platformRoot, "android.jar")]).collect{ "--classpath $it.path" }.join(" ")

def d8 = isWindows ? "d8.bat" : "d8"

//dex and desugar files - this requires d8 in your PATH
"$d8 $dependencies --min-api 14 --output ${project.archivesBaseName}Android.jar ${project.archivesBaseName}Desktop.jar"
.execute(null, new File("$buildDir/libs")).waitForProcessOutput(System.out, System.err)
}
}

jar{
archiveFileName = "${base.archivesBaseName}Desktop.jar"

from{
configurations.runtimeClasspath.collect{ it.isDirectory() ? it : zipTree(it) }
}

from(rootDir){
include "mod.hjson"
}

from("assets/"){
include "**"
}
}

task deploy(type: Jar){
dependsOn jarAndroid
dependsOn jar
archiveFileName = "${base.archivesBaseName}.jar"

from{ [zipTree("$buildDir/libs/${project.archivesBaseName}Desktop.jar"), zipTree("$buildDir/libs/${project.archivesBaseName}Android.jar")] }

doLast{
delete{
delete "$buildDir/libs/${project.archivesBaseName}Desktop.jar"
delete "$buildDir/libs/${project.archivesBaseName}Android.jar"
}
}
}
13 changes: 13 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
org.gradle.jvmargs=--illegal-access=permit \
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 3afd16e

Please sign in to comment.