Skip to content

Commit

Permalink
Merge pull request #5823 from rjhancock/gradle-ini-fixes
Browse files Browse the repository at this point in the history
Additional refinements related to INI and script names.
  • Loading branch information
HammerGS authored Jul 29, 2024
2 parents f09ccdb + e1da6f3 commit 966c803
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions megamek/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'edu.sc.seis.launch4j' version '3.0.6'
id 'jacoco'
id 'java'
id "io.sentry.jvm.gradle" version '4.9.0'
id "io.sentry.jvm.gradle" version '4.10.0'
id 'com.palantir.git-version' version '3.1.0'
}

Expand Down Expand Up @@ -34,23 +34,23 @@ sourceSets {
}

dependencies {
implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.1'
implementation 'com.formdev:flatlaf:3.4.1'
implementation 'com.formdev:flatlaf-extras:3.4.1'
implementation 'com.fasterxml.jackson.core:jackson-core:2.17.2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2'
implementation 'com.formdev:flatlaf:3.5'
implementation 'com.formdev:flatlaf-extras:3.5'
implementation 'com.sun.mail:jakarta.mail:2.0.1'
implementation 'com.thoughtworks.xstream:xstream:1.4.20'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
implementation 'org.apache.commons:commons-collections4:4.5.0-M2'
implementation 'org.apache.commons:commons-lang3:3.14.0'
implementation 'org.apache.commons:commons-lang3:3.15.0'
implementation 'org.apache.commons:commons-text:1.12.0'
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
implementation 'org.apache.logging.log4j:log4j-core:2.23.1'
implementation 'org.freemarker:freemarker:2.3.33'

runtimeOnly 'org.glassfish.jaxb:jaxb-runtime:4.0.5'

testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.3'

testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3'
testImplementation 'org.mockito:mockito-core:5.12.0'
Expand All @@ -77,9 +77,7 @@ ext {
log = "logs"
mmconf = "mmconf"
userdata = 'userdata'
distributionDir = "${buildDir}/distributions"
fileStagingDir = "${buildDir}/files"
mmRepoDir = "${buildDir}/repo"
atlasedImages = "${fileStagingDir}/atlasedImages.txt"
scriptsDir = "${projectDir}/scripts"
scriptTemplate = "${scriptsDir}/startScriptTemplate.txt"
Expand Down Expand Up @@ -129,6 +127,7 @@ task equipmentList(type: JavaExec, dependsOn: jar) {

task copyFiles(type: Copy) {
description = 'Stages files that are to be copied into the distribution.'
group = 'build'

dependsOn officialUnitList
dependsOn equipmentList
Expand All @@ -141,20 +140,14 @@ task copyFiles(type: Copy) {
include "SubmitBug.html"
include "license.txt"
include "sentry.properties"
include "MegaMek.l4j.ini"
include "*.ini"
exclude "**/*.psd"
// No need to copy the files that are going to be zipped
exclude { it.file.isDirectory() && (it.file in file(unitFiles).listFiles()) }
exclude "${rats}/**"
include "${userdata}/"

into fileStagingDir

inputs.dir "${data}"
inputs.dir "${docs}"
inputs.dir "${mmconf}"
inputs.files 'license.txt', 'SubmitBug.html', 'sentry.properties', 'MegaMek.l4j.ini'
outputs.dir fileStagingDir
}

task createImageAtlases(type: JavaExec, dependsOn: copyFiles) {
Expand Down Expand Up @@ -213,7 +206,7 @@ task stageFiles {

task createStartScripts (type: CreateStartScripts) {
description = 'Create shell script for generic distribution.'
applicationName = 'mm'
applicationName = 'megamek'
mainClass = application.mainClass
outputDir = startScripts.outputDir
classpath = jar.outputs.files + files(project.sourceSets.main.runtimeClasspath.files)
Expand All @@ -239,13 +232,12 @@ distributions {
contents {
from ("${buildDir}/launch4j") {
include '*.exe'
include '*.ini'
}
from(jar) {
into "${lib}"
}
from(createStartScripts.outputs.files) {
include "mm*"
include "megamek*"
}
from(jar)
from fileStagingDir
Expand Down

0 comments on commit 966c803

Please sign in to comment.