Fixed compliation errors.
Added "copyPlugins" gradle task which copies all plugins into the proper directory.
build
.gradle
+.idea
+app/plugins/
dependencies {
compile project(':api')
- compile 'ro.fortsoft.pf4j:pf4j:0.4'
+ compile 'ro.fortsoft.pf4j:pf4j:1.1.1'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile group: 'junit', name: 'junit', version: '4.+'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.6.1'
mavenLocal()
mavenCentral()
}
+}
+task copyPlugins() << {
+ delete 'app/plugins'
+ mkdir 'app/plugins'
- task wrapper(type: Wrapper) {
- gradleVersion = '1.11'
+ subprojects.each { p ->
+ if (p.path.contains(":plugins/")) {
+ System.out.println("Copying plugin from " + p.path);
+ copy {
+ from p.projectDir.toString() + '/build/libs'
+ into 'app/plugins'
+ include '*.zip'
+ }
+ }
}
-}
\ No newline at end of file
+}
manifest {
attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.welcome.WelcomePlugin',
'Plugin-Id' : 'WelcomePlugin',
- 'Plugin-Version' : '1.0',
+ 'Plugin-Version' : '1.0.0',
'Plugin-Provider' : 'Decebal Suiu'
}
}
dependencies {
compile project(':api')
- compile 'ro.fortsoft.pf4j:pf4j:0.4'
+ compile 'ro.fortsoft.pf4j:pf4j:1.1.1'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
baseName = 'HelloPlugin'
version = '0.1.0'
manifest {
- attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.welcome.HelloPlugin',
+ attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.hello.HelloPlugin',
'Plugin-Id' : 'HelloPlugin',
- 'Plugin-Version' : '1.0',
+ 'Plugin-Version' : '1.0.0',
'Plugin-Provider' : 'Decebal Suiu'
}
}
dependencies {
compile project(':api')
- compile 'ro.fortsoft.pf4j:pf4j:0.4'
+ compile 'ro.fortsoft.pf4j:pf4j:1.1.1'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile group: 'junit', name: 'junit', version: '4.+'
}