Skip to content

Commit

Permalink
Merge branch 'MegaMek:master' into opFor_generation3
Browse files Browse the repository at this point in the history
  • Loading branch information
IllianiCBT authored Sep 23, 2024
2 parents f076d31 + dfeb43e commit 99329f5
Show file tree
Hide file tree
Showing 67 changed files with 1,285 additions and 1,201 deletions.
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
root = true
charset = "utf-8"

[*.java]
indent_style = "space"
indent_size = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 140 # Google Style Guide
curly_bracket_next_line = false
spaces_around_operators = true
spaces_around_brackets = "both"
indent_brace_style = "K&R"
wildcard_import_limit = 10
continuation_indent_size = 4 # Google Style Guid

[*.xml]
indent_style = "space"
indent_size = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.blk]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.mtf]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Build with Gradle
working-directory: megamek
run: ./gradlew build --stacktrace --scan
run: ./gradlew build -x checkstyleMain -x checkstyleTest --stacktrace --scan

- name: Upload Test Logs on Failure
uses: actions/upload-artifact@v4
Expand All @@ -55,12 +55,6 @@ jobs:
fail_ci_if_error: false
verbose: true

# - name: Upload Zip Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: mm-release-zip-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }}
# path: ./megamek/megamek/build/distributions/*.zip

- name: Upload TarGZ Release
uses: actions/upload-artifact@v4
with:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/java-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: JavaDoc Generation

on:
pull_request:
branches: [master]

env:
GRADLE_OPTS: "-Dscan.link.VCS=${{ github.event.pull_request.html_url }}"

jobs:
javadoc:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
java-distribution: [temurin]
java-version: [17]
fail-fast: false

steps:
- name: "Check out MegaMek"
uses: actions/checkout@v4
with:
path: megamek

- name: Set up ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
working-directory: megamek
run: ./gradlew javadoc
1 change: 0 additions & 1 deletion README.md

This file was deleted.

2 changes: 2 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=17
68 changes: 0 additions & 68 deletions megamek/HACKING

This file was deleted.

File renamed without changes.
22 changes: 20 additions & 2 deletions megamek/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import java.time.LocalDateTime

plugins {
id 'application'
id 'checkstyle'
id 'com.palantir.git-version' version '3.1.0'
id 'edu.sc.seis.launch4j' version '3.0.6'
id "io.sentry.jvm.gradle" version '4.11.0'
id 'jacoco'
id 'java'
id "io.sentry.jvm.gradle" version '4.11.0'
id 'com.palantir.git-version' version '3.1.0'
id 'org.ec4j.editorconfig' version '0.1.0'

}

java {
Expand Down Expand Up @@ -82,6 +85,12 @@ ext {
atlasedImages = "${fileStagingDir}/atlasedImages.txt"
}

checkstyle {
toolVersion '10.18.1'
configFile file("config/checkstyle/checkstyle.xml")
ignoreFailures false
}

run {
jvmArgs = mmJvmOptions
}
Expand Down Expand Up @@ -389,3 +398,12 @@ task unitFileMigrationTool(type: JavaExec, dependsOn: jar) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'megamek.utilities.UnitFileMigrationTool'
}

tasks.withType(Checkstyle) {
minHeapSize = "200m"
maxHeapSize = "1g"
reports {
xml.required = false
html.required = true
}
}
Loading

0 comments on commit 99329f5

Please sign in to comment.