Skip to content

Commit

Permalink
Merge pull request Anuken#45 from Anuken/master
Browse files Browse the repository at this point in the history
yeet b125
  • Loading branch information
fuzzbuck committed Feb 17, 2021
2 parents 2523088 + ff9fad6 commit 1f6cb62
Show file tree
Hide file tree
Showing 304 changed files with 7,220 additions and 4,919 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,31 @@ jobs:
java-version: 14
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Add Arc release
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
cd ../Arc
git tag ${RELEASE_VERSION}
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/Arc ${RELEASE_VERSION};
cd ../Mindustry
- name: Create artifacts
run: |
./gradlew desktop:dist server:dist core:javadoc -Pbuildversion=${RELEASE_VERSION:1}
./gradlew desktop:dist server:dist core:mergedJavadoc -Pbuildversion=${RELEASE_VERSION:1}
- name: Update docs
run: |
cd ../
git config --global user.email "cli@github.com"
git config --global user.name "Github Actions"
git clone --depth=1 https://github.com/MindustryGame/docs.git
cp -a Mindustry/core/build/docs/javadoc/. docs/
cd docs
find . -maxdepth 1 ! -name ".git" ! -name . -exec rm -r {} \;
cd ../
cp -a Mindustry/core/build/javadoc/. docs/
cd docs
git add .
git commit -m "Update ${RELEASE_VERSION:1}"
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/MindustryGame/docs
cd ../Mindustry
- name: Add Arc release
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
cd ../Arc
git tag ${RELEASE_VERSION}
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/Arc ${RELEASE_VERSION};
cd ../Mindustry
- name: Update F-Droid build string
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
Expand All @@ -47,6 +50,7 @@ jobs:
echo versionName=6-fdroid-${RELEASE_VERSION:1}$'\n'versionCode=${RELEASE_VERSION:1} > version_fdroid.txt
git add .
git commit -m "Updating to build ${RELEASE_VERSION:1}"
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryBuilds
cd ../Mindustry
- name: Upload client artifacts
uses: svenstaro/upload-release-action@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ios/robovm.properties
packr-out/
config/
*.gif
/tests/out

/core/assets/basepartnames
version.properties
Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ If you are submitting a new block, make sure it has a name and description, and
If you are interested in adding a large mechanic/feature or changing large amounts of code, first contact me (Anuken) via [Discord](https://discord.gg/mindustry) (preferred method) or via e-mail (*anukendev@gmail.com*).
For most changes, this should not be necessary. I just want to know if you're doing something big so I can offer advice and/or make sure you're not wasting your time on it.

### Do not include packed sprites in your pull request.
When making a pull request that changes or adds new sprites, do not add the modified atlas & `spritesX.png` files to your final pull request. These are a frequent source of conflicts.


## Style Guidelines

Expand Down
3 changes: 1 addition & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript{
mavenCentral()
google()
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}

dependencies{
Expand All @@ -20,8 +19,8 @@ configurations{ natives }

repositories{
mavenCentral()
jcenter()
maven{ url "https://maven.google.com" }
jcenter() //remove later once google fixes the dependency
}

dependencies{
Expand Down
2 changes: 1 addition & 1 deletion android/src/mindustry/android/AndroidLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected void onCreate(Bundle savedInstanceState){
handler.uncaughtException(thread, error);
}else{
error.printStackTrace();
Log.err(error);
System.exit(1);
}
});
Expand Down Expand Up @@ -161,7 +162,6 @@ public void endForceLandscape(){
}, new AndroidApplicationConfiguration(){{
useImmersiveMode = true;
hideStatusBar = true;
stencil = 8;
}});
checkFiles(getIntent());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void generateFor(Seq<MethodEntry> entries, String className, String packa
}

readBlock.nextControlFlow("catch (java.lang.Exception e)");
readBlock.addStatement("throw new java.lang.RuntimeException(\"Failed to to read remote method '" + entry.element.getSimpleName() + "'!\", e)");
readBlock.addStatement("throw new java.lang.RuntimeException(\"Failed to read remote method '" + entry.element.getSimpleName() + "'!\", e)");
readBlock.endControlFlow();
}

Expand Down
42 changes: 40 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ buildscript{
mavenCentral()
google()
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
maven{ url 'https://jitpack.io' }
}

Expand Down Expand Up @@ -184,7 +183,6 @@ allprojects{
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
maven{ url 'https://jitpack.io' }
jcenter()
}

task clearCache{
Expand Down Expand Up @@ -320,6 +318,15 @@ project(":core"){
}
}

task sourcesJar(type: Jar, dependsOn: classes){
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts{
archives sourcesJar
}

dependencies{
compileJava.dependsOn(preGen)

Expand All @@ -337,6 +344,28 @@ project(":core"){
annotationProcessor 'com.github.Anuken:jabel:34e4c172e65b3928cd9eabe1993654ea79c409cd'

}

afterEvaluate{
task mergedJavadoc(type: Javadoc){
def blacklist = [project(":ios"), project(":desktop"), project(":server"), project(":annotations")]
if(findProject(":android") != null){
blacklist += project(":android")
}

source rootProject.subprojects.collect{ project ->
if(!blacklist.contains(project) && project.hasProperty("sourceSets")){
return project.sourceSets.main.allJava
}
}

classpath = files(rootProject.subprojects.collect { project ->
if(!blacklist.contains(project) && project.hasProperty("sourceSets")){
return project.sourceSets.main.compileClasspath
}
})
destinationDir = new File(buildDir, 'javadoc')
}
}
}

project(":server"){
Expand Down Expand Up @@ -410,3 +439,12 @@ task deployAll{
dependsOn "server:deploy"
dependsOn "android:deploy"
}

task resolveDependencies{
doLast{
rootProject.allprojects{ project ->
Set<Configuration> configurations = project.buildscript.configurations + project.configurations
configurations.findAll{c -> c.canBeResolved}.forEach{c -> c.resolve()}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/assets-raw/sprites/blocks/campaign/launch-pad-large.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 core/assets-raw/sprites/effects/select-arrow.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 modified core/assets-raw/sprites/items/item-plastanium.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 core/assets-raw/sprites/ui/pane-solid.9.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 removed core/assets-raw/sprites/units/vanguard-cell.png
Binary file not shown.
Binary file removed core/assets-raw/sprites/units/vanguard.png
Binary file not shown.
Loading

0 comments on commit 1f6cb62

Please sign in to comment.