aboutsummaryrefslogtreecommitdiffstats
path: root/demo_gradle/plugins/build.gradle
blob: a46f84c5d48a937a4fc1b492cba7d94f7ca14cb8 (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
subprojects {
  jar {
    manifest {
      attributes 'Plugin-Class': "${pluginClass}",
          'Plugin-Id': "${pluginId}",
          'Plugin-Version': "${archiveVersion}",
          'Plugin-Provider': "${pluginProvider}",
          'Plugin-Dependencies': "${pluginDependencies}"
    }
  }

  task plugin(type: Jar) {
    archiveBaseName = "plugin-${pluginId}"
    into('classes') {
      with jar
    }
    into('lib') {
      from configurations.compile
    }
    archiveExtension ='zip'
  }

  task assemblePlugin(type: Copy) {
    from plugin
    into pluginsDir
  }
}

task assemblePlugins(type: Copy) {
  dependsOn subprojects.assemblePlugin
}

build.dependsOn project.tasks.assemblePlugins