aboutsummaryrefslogtreecommitdiffstats
path: root/demo/gradle/app/build.gradle
blob: eaab92a2b47c2aa837f18cef92b9222f55c24a3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
apply plugin: 'application'

mainClassName = 'org.pf4j.demo.Boot'
run {
  systemProperty 'pf4j.pluginsDir', '../build/plugins'
}

dependencies {
  implementation project(':api')
  implementation group: 'org.pf4j', name: 'pf4j', version: "${pf4jVersion}"
  annotationProcessor(group: 'org.pf4j', name: 'pf4j', version: "${pf4jVersion}")
  implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
  implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'

  testImplementation 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"
}