aboutsummaryrefslogtreecommitdiffstats
path: root/demo_gradle/plugins/plugin1/build.gradle
blob: 596101e0b2f2432fdff1610daae36a8a27146b07 (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
jar {
    baseName = 'WelcomePlugin'
    version = '0.1.0'
    manifest {
    attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.welcome.WelcomePlugin',
        'Plugin-Id' : 'WelcomePlugin',
        'Plugin-Version' : '1.0.0',
        'Plugin-Provider' : 'Decebal Suiu'
    }
}

task plugin(type: Jar) {
  baseName = 'WelcomePlugin'
  version = '0.1.0'
  into('classes'){
     with jar
  }
  into('lib'){
    from configurations.compile
  }
  extension('zip')
}
assemble.dependsOn plugin

dependencies {
  compileOnly project(':api') // compileOnly important!!! We do not want to put the api into the zip file since the main program has it already!
  compile ('ro.fortsoft.pf4j:pf4j:1.3.0') {
      exclude group: "org.slf4j"
  }
  compile 'org.apache.commons:commons-lang3:3.5'
  testCompile group: 'junit', name: 'junit', version: '4.+'
}