|
|
|
apply plugin: 'application'
|
|
|
|
|
|
|
|
mainClassName = 'org.pf4j.demo.Boot'
|
|
|
|
run {
|
|
|
|
systemProperty 'pf4j.pluginsDir', '../build/plugins'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(':api')
|
|
|
|
compile group: 'org.pf4j', name: 'pf4j', version: "${pf4jVersion}"
|
|
|
|
annotationProcessor(group: 'org.pf4j', name: 'pf4j', version: "${pf4jVersion}")
|
|
|
|
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
|
|
|
|
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
|
|
|
|
|
|
|
|
testCompile group: 'junit', name: 'junit', version: '4.+'
|
|
|
|
}
|
|
|
|
|
|
|
|
task uberjar(type: Jar, dependsOn: ['compileJava']) {
|
|
|
|
zip64 true
|
|
|
|
from configurations.runtimeClasspath.asFileTree.files.collect {
|
|
|
|
exclude "META-INF/*.SF"
|
|
|
|
exclude "META-INF/*.DSA"
|
|
|
|
exclude "META-INF/*.RSA"
|
|
|
|
zipTree(it)
|
|
|
|
}
|
|
|
|
from files(sourceSets.main.output.classesDirs)
|
|
|
|
from files(sourceSets.main.resources)
|
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': mainClassName
|
|
|
|
}
|
|
|
|
|
|
|
|
archiveBaseName = "${project.name}-plugin-demo"
|
|
|
|
archiveClassifier = "uberjar"
|
|
|
|
}
|
|
|
|
|