Skip to content

Commit 083da23

Browse files
authored
Oul reimplement during packaging (#6658)
2 parents d65241e + c2607b5 commit 083da23

File tree

6 files changed

+53
-19
lines changed

6 files changed

+53
-19
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ indent_size = 4
77
end_of_line = lf
88
trim_trailing_whitespace = true
99
insert_final_newline = true
10-
max_line_length = 140 # Google Style Guide
10+
max_line_length = 120
1111
curly_bracket_next_line = false
1212
spaces_around_operators = true
1313
spaces_around_brackets = "both"
1414
indent_brace_style = "K&R"
1515
wildcard_import_limit = 10
16-
continuation_indent_size = 4 # Google Style Guid
16+
continuation_indent_size = 6
1717

1818
[*.xml]
1919
indent_style = "space"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: JavaDoc Generation
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
env:
8+
GRADLE_OPTS: "-Dscan.link.VCS=${{ github.event.pull_request.html_url }}"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: "Check out MegaMek"
16+
uses: actions/checkout@v4
17+
with:
18+
path: megamek
19+
20+
- name: Set up Temurin JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: temurin
24+
java-version: 17
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v4
28+
with:
29+
build-scan-publish: true
30+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
31+
build-scan-terms-of-use-agree: "yes"
32+
33+
- name: Build with Gradle
34+
working-directory: megamek
35+
run: ./gradlew javadoc

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

megamek/build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ task deleteAtlasedImages(dependsOn: createImageAtlases) {
183183
}
184184
}
185185

186+
task officialUnitList(type: JavaExec, dependsOn: jar) {
187+
description = 'Compiles a list of all units that come from official sources and saves it in the docs folder.'
188+
group = 'utility'
189+
classpath = sourceSets.main.runtimeClasspath
190+
mainClass = 'megamek.MegaMek'
191+
args = ['-oul', "${projectDir}/docs/OfficialUnitList.txt"]
192+
}
193+
186194
task unitFilesZip (dependsOn: copyFiles) {
187195
description = 'Creates zip archives of all the unit file folders.'
188196
file(unitFiles).eachDir {subDir ->
@@ -211,6 +219,7 @@ task ratZip (type: Zip) {
211219
task stageFiles {
212220
description = 'Process data files to be included in distribution'
213221
group = 'distribution'
222+
dependsOn officialUnitList
214223
dependsOn unitFilesZip
215224
dependsOn ratZip
216225
dependsOn deleteAtlasedImages
@@ -333,20 +342,11 @@ task testWithGUITests(type: Test) {
333342
jvmArgs = mmJvmOptions
334343
environment 'GUITests', "true"
335344

336-
group 'verification'
337-
description 'Sets environment var to include GUI unit tests; no report generated.'
345+
group='verification'
346+
description='Sets environment var to include GUI unit tests; no report generated.'
338347
}
339348

340349
// These are utility classes for all of the classes with the src/utilities folder.
341-
342-
task officialUnitList(type: JavaExec, dependsOn: jar) {
343-
description = 'Compiles a list of all units that come from official sources and saves it in the docs folder.'
344-
group = 'utility'
345-
classpath = sourceSets.main.runtimeClasspath
346-
mainClass = 'megamek.MegaMek'
347-
args = ['-oul', "${projectDir}/docs/OfficialUnitList.txt"]
348-
}
349-
350350
task equipmentList(type: JavaExec, dependsOn: jar) {
351351
description = 'Generate Full Equipment Database'
352352
group = 'database'
@@ -460,7 +460,7 @@ task nameChangesValidator(type: JavaExec, dependsOn: jar) {
460460
}
461461

462462
task ratGeneratorEditor(type: JavaExec, dependsOn: copyFiles) {
463-
description = 'Checks for issues related to name changes.'
463+
description = 'RAT Editor.'
464464
group = 'utility'
465465
classpath = sourceSets.main.runtimeClasspath
466466
mainClass = 'megamek.utilities.RATGeneratorEditor'
@@ -474,7 +474,7 @@ task techLevelCompareTool(type: JavaExec, dependsOn: jar) {
474474
}
475475

476476
task unitFileMigrationTool(type: JavaExec, dependsOn: jar) {
477-
description = 'Tech Level Comparison Tool'
477+
description = 'Unit File Migration Tool'
478478
group = 'utility'
479479
classpath = sourceSets.main.runtimeClasspath
480480
mainClass = 'megamek.utilities.UnitFileMigrationTool'

megamek/config/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ https://raw.githubusercontent.com/checkstyle/checkstyle/master/src/main/resource
5555

5656
<module name="LineLength">
5757
<property name="fileExtensions" value="java" />
58-
<property name="max" value="140" />
58+
<property name="max" value="120" />
5959
<property name="ignorePattern"
6060
value="^package.*|^import.*|href\s*=\s*&quot;[^&quot;]*&quot;|http://|https://|ftp://" />
6161
</module>

0 commit comments

Comments
 (0)