mirror of
https://bitbucket.org/projectswg/holocore.git
synced 2026-01-16 23:04:20 -05:00
114 lines
3.3 KiB
Groovy
114 lines
3.3 KiB
Groovy
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
plugins {
|
|
id 'application'
|
|
id 'java'
|
|
id 'idea'
|
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
|
id "org.javamodularity.moduleplugin" version "1.5.0"
|
|
id 'org.jetbrains.kotlin.jvm' version '1.3.30'
|
|
id "org.beryx.jlink" version "2.10.1"
|
|
}
|
|
|
|
mainClassName = 'holocore/com.projectswg.holocore.ProjectSWG'
|
|
sourceCompatibility = 12
|
|
|
|
sourceSets {
|
|
main
|
|
display
|
|
utility
|
|
integration
|
|
}
|
|
|
|
test {
|
|
afterSuite { TestDescriptor td, TestResult tr ->
|
|
if (td.parent == null) {
|
|
println 'Tests run: (' + tr.getTestCount() + '), Failures: (' + tr.getFailedTestCount() + ')' // IMPORTANT - this is required for Lightspeed
|
|
}
|
|
}
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
inheritOutputDirs = true
|
|
}
|
|
}
|
|
|
|
jlink {
|
|
// addOptions '--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'
|
|
imageDir.set(file("$buildDir/holocore"))
|
|
imageZip.set(file("$buildDir/holocore.zip"))
|
|
launcher {
|
|
name = 'holocore'
|
|
jvmArgs = []
|
|
unixScriptTemplate = file('src/main/resources/jlink-unix-launch-template.txt')
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
archivesBaseName = 'Holocore'
|
|
archiveClassifier.set(null)
|
|
archiveVersion.set(null)
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':pswgcommon')
|
|
|
|
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.3.30'
|
|
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.23.1'
|
|
compile group: 'org.mongodb', name: 'mongodb-driver-sync', version: '3.9.1'
|
|
compile group: 'me.joshlarson', name: "fast-json", version: '3.0.0'
|
|
compile group: 'me.joshlarson', name: 'jlcommon-network', version: '1.0.0'
|
|
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
|
|
|
|
testCompile 'junit:junit:4.12'
|
|
|
|
displayCompile project(':pswgcommon')
|
|
displayCompile sourceSets.main.output
|
|
|
|
utilityCompile project(':pswgcommon')
|
|
utilityCompile sourceSets.main.output
|
|
utilityCompile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.23.1'
|
|
utilityCompile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.6.3'
|
|
utilityCompile group: 'me.joshlarson', name: "fast-json", version: '3.0.0'
|
|
|
|
integrationCompile project(':pswgcommon')
|
|
integrationCompile project(':client-holocore')
|
|
integrationCompile sourceSets.main.output
|
|
integrationCompile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.23.1'
|
|
integrationCompile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.6.3'
|
|
integrationCompile 'junit:junit:4.12'
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
|
|
task CreateConvertLoginJar(type: ShadowJar) {
|
|
archivesBaseName = "ConvertLogin"
|
|
archiveClassifier.set(null)
|
|
archiveVersion.set(null)
|
|
manifest.attributes 'Main-Class': 'com.projectswg.utility.ConvertLogin'
|
|
from sourceSets.utility.output
|
|
configurations = [project.configurations.utilityRuntime]
|
|
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')
|
|
}
|
|
|
|
task CreatePacketCaptureProcessor(type: ShadowJar) {
|
|
archivesBaseName = "PacketCaptureProcessor"
|
|
archiveClassifier.set(null)
|
|
archiveVersion.set(null)
|
|
manifest.attributes 'Main-Class': 'com.projectswg.utility.packets.ProcessPacketCapture'
|
|
from sourceSets.utility.output
|
|
configurations = [project.configurations.utilityRuntime]
|
|
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')
|
|
}
|