2019-05-29 16:08:25 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
mavenLocal()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'org.codehaus.griffon:gradle-griffon-plugin:2.15.1'
|
|
|
|
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
|
|
|
|
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
|
|
|
|
classpath 'org.gradle.api.plugins:gradle-izpack-plugin:0.2.3'
|
2019-11-11 10:52:37 +02:00
|
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
|
2019-05-29 16:08:25 +01:00
|
|
|
classpath 'com.github.cr0:gradle-macappbundle-plugin:3.1.0'
|
|
|
|
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.2'
|
|
|
|
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
|
|
|
|
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:1.2.5'
|
|
|
|
classpath 'net.nemerosa:versioning:2.6.1'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'org.codehaus.griffon.griffon'
|
|
|
|
apply plugin: 'net.nemerosa.versioning'
|
|
|
|
|
|
|
|
Date buildTimeAndDate = new Date()
|
|
|
|
ext {
|
|
|
|
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
|
|
|
|
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
|
|
|
|
macosx = System.getProperty('os.name').contains('Mac OS')
|
|
|
|
}
|
|
|
|
|
|
|
|
griffon {
|
|
|
|
disableDependencyResolution = false
|
|
|
|
includeGroovyDependencies = true
|
|
|
|
version = '2.15.1'
|
|
|
|
toolkit = 'swing'
|
|
|
|
applicationProperties = [
|
|
|
|
'build_date' : buildDate,
|
|
|
|
'build_time' : buildTime,
|
|
|
|
'build_revision': versioning.info.commit
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-10-31 13:02:44 +00:00
|
|
|
application {
|
|
|
|
mainClassName = 'com.muwire.gui.Launcher'
|
2020-06-11 19:16:48 +01:00
|
|
|
applicationName = 'MuWire'
|
|
|
|
}
|
|
|
|
|
|
|
|
run {
|
|
|
|
applicationDefaultJvmArgs=[]
|
|
|
|
}
|
|
|
|
|
|
|
|
startScripts.doFirst {
|
|
|
|
application.applicationDefaultJvmArgs = ["-Djava.util.logging.config.file=logging.properties",
|
|
|
|
"-Xmx256M",
|
2020-06-05 13:23:54 +01:00
|
|
|
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
|
|
|
|
"--add-opens", "java.base/sun.nio.fs=ALL-UNNAMED",
|
2020-06-16 14:05:41 +01:00
|
|
|
"--add-opens", "java.base/java.nio=ALL-UNNAMED",
|
2020-06-05 13:23:54 +01:00
|
|
|
"--add-opens", "java.desktop/java.awt=ALL-UNNAMED",
|
|
|
|
"--add-opens", "java.desktop/javax.swing=ALL-UNNAMED",
|
|
|
|
"--add-opens", "java.desktop/javax.swing.plaf.basic=ALL-UNNAMED"]
|
2020-06-11 19:16:48 +01:00
|
|
|
|
2019-10-31 13:02:44 +00:00
|
|
|
}
|
2019-05-29 16:08:25 +01:00
|
|
|
|
|
|
|
apply from: 'gradle/publishing.gradle'
|
2019-10-05 04:31:11 +01:00
|
|
|
// apply from: 'gradle/code-coverage.gradle'
|
|
|
|
// apply from: 'gradle/code-quality.gradle'
|
|
|
|
// apply from: 'gradle/integration-test.gradle'
|
2019-05-29 16:08:25 +01:00
|
|
|
// apply from: 'gradle/package.gradle'
|
|
|
|
apply from: 'gradle/docs.gradle'
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
apply plugin: 'org.kordamp.gradle.stats'
|
|
|
|
apply plugin: 'com.github.ben-manes.versions'
|
|
|
|
apply plugin: 'com.github.kt3k.coveralls'
|
|
|
|
|
2020-06-06 04:23:14 +01:00
|
|
|
|
|
|
|
configurations.all {
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-test'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-testng'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-test-junit5'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-ant'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-sql'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-nio'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-servlet'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-jmx'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-groovydoc'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-groovysh'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-xml'
|
|
|
|
exclude group:'org.codehaus.groovy', module:'groovy-docgenerator'
|
|
|
|
// TODO: add more as discovered
|
|
|
|
}
|
|
|
|
|
2019-05-29 16:08:25 +01:00
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
|
|
|
compile "org.codehaus.griffon:griffon-guice:${griffon.version}"
|
2020-06-06 04:23:14 +01:00
|
|
|
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
|
2019-05-29 16:08:25 +01:00
|
|
|
|
2019-10-19 04:45:45 +01:00
|
|
|
// runtime "org.slf4j:slf4j-simple:${slf4jVersion}"
|
|
|
|
|
|
|
|
runtime group: 'org.slf4j', name: 'slf4j-jdk14', version: "${slf4jVersion}"
|
|
|
|
runtime group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
|
|
|
|
runtime group: 'org.slf4j', name: 'jul-to-slf4j', version: "${slf4jVersion}"
|
2019-06-02 10:04:27 +01:00
|
|
|
runtime "javax.annotation:javax.annotation-api:1.3.2"
|
2019-05-29 16:08:25 +01:00
|
|
|
|
2020-09-14 13:33:01 +01:00
|
|
|
// because java 14 doesn't come with it
|
|
|
|
runtime 'mrj:MRJToolkitStubs:1.0'
|
|
|
|
|
2019-05-29 16:08:25 +01:00
|
|
|
testCompile "org.codehaus.griffon:griffon-fest-test:${griffon.version}"
|
|
|
|
testCompile "org.spockframework:spock-core:${spockVersion}"
|
|
|
|
testCompile('org.awaitility:awaitility-groovy:3.1.0') {
|
|
|
|
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
|
|
|
}
|
|
|
|
testCompile "org.codehaus.groovy:groovy-all:${groovyVersion}"
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourceJar(type: Jar) {
|
|
|
|
group 'Build'
|
|
|
|
description 'An archive of the source code'
|
|
|
|
classifier 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
sourceCompatibility = project.sourceCompatibility
|
|
|
|
targetCompatibility = project.targetCompatibility
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(GroovyCompile) {
|
|
|
|
sourceCompatibility = project.sourceCompatibility
|
|
|
|
targetCompatibility = project.targetCompatibility
|
|
|
|
}
|
|
|
|
|
|
|
|
import com.github.jengelman.gradle.plugins.shadow.transformers.*
|
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
|
|
|
ext.backgroundImage = 'i2plogo.png'
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
transform(ServiceFileTransformer)
|
|
|
|
transform(ServiceFileTransformer) {
|
|
|
|
path = 'META-INF/griffon'
|
|
|
|
}
|
|
|
|
transform(ServiceFileTransformer) {
|
|
|
|
path = 'META-INF/types'
|
|
|
|
}
|
|
|
|
transform(PropertiesFileTransformer) {
|
|
|
|
paths = [
|
|
|
|
'META-INF/editors/java.beans.PropertyEditor'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
startScripts {
|
|
|
|
doLast {
|
|
|
|
if (!macosx) unixScript.text = unixScript.text.replaceAll('"(-Xdock:(name|icon)=)([^"]*?)(")', ' ')
|
|
|
|
windowsScript.text = windowsScript.text.replaceAll('"(-Xdock:(name|icon)=)([^"]*?)(")', ' ')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hasProperty('debugRun') && ((project.debugRun as boolean))) {
|
|
|
|
run {
|
|
|
|
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-05 04:31:11 +01:00
|
|
|
/*
|
2019-05-29 16:08:25 +01:00
|
|
|
task jacocoRootMerge(type: org.gradle.testing.jacoco.tasks.JacocoMerge, dependsOn: [test, jacocoTestReport, jacocoIntegrationTestReport]) {
|
|
|
|
executionData = files(jacocoTestReport.executionData, jacocoIntegrationTestReport.executionData)
|
|
|
|
destinationFile = file("${buildDir}/jacoco/root.exec")
|
|
|
|
}
|
|
|
|
|
|
|
|
task jacocoRootReport(dependsOn: jacocoRootMerge, type: JacocoReport) {
|
|
|
|
group = 'Reporting'
|
|
|
|
description = 'Generate Jacoco coverage reports after running all tests.'
|
|
|
|
executionData file("${buildDir}/jacoco/root.exec")
|
|
|
|
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
|
|
|
|
classDirectories = files(sourceSets.main.output)
|
|
|
|
reports {
|
|
|
|
csv.enabled = false
|
|
|
|
xml.enabled = true
|
|
|
|
html.enabled = true
|
|
|
|
html.destination = file("${buildDir}/reports/jacoco/root/html")
|
|
|
|
xml.destination = file("${buildDir}/reports/jacoco/root/root.xml")
|
|
|
|
}
|
|
|
|
}
|
2019-10-05 04:31:11 +01:00
|
|
|
*/
|
2019-05-29 16:08:25 +01:00
|
|
|
|