@@ -14,6 +14,8 @@ if (JavaVersion.current().isJava8Compatible()) {
1414
1515allprojects {
1616
17+ defaultTasks " build"
18+
1719 ext {
1820 isSnapshot = true
1921 fjBaseVersion = " 4.3"
@@ -45,34 +47,38 @@ allprojects {
4547
4648 version = fjVersion
4749 group = " org.functionaljava"
50+
4851}
4952
5053subprojects {
5154
52- defaultTasks " build"
55+ buildscript {
56+ repositories {
57+ mavenCentral()
58+ }
5359
54- buildscript {
55- repositories {
56- mavenCentral()
57- }
60+ dependencies {
61+ classpath ' me.tatarka:gradle-retrolambda:2.5.0 '
62+ }
63+ }
5864
59- dependencies {
60- classpath ' me.tatarka:gradle-retrolambda:2.5.0'
61- }
62- }
65+ apply from : " $rootDir /lib.gradle"
66+ apply plugin : " java"
67+ apply plugin : " eclipse"
6368
64- repositories {
65- mavenCentral()
69+ repositories {
70+ mavenCentral()
6671 maven {
6772 url sonatypeRepositoryUrl
6873 }
69-
7074 }
75+ }
76+
77+ configure(subprojects. findAll {it. name != ' tests' }) {
7178
72- apply from : " $rootDir /lib.gradle"
7379 apply plugin : " maven"
74- apply plugin : " java"
7580 apply plugin : " signing"
81+ apply plugin : " osgi"
7682
7783 sourceCompatibility = " 1.8"
7884
@@ -95,12 +101,34 @@ subprojects {
95101 jar {
96102 version project. fjVersion
97103 manifest {
98- attributes ' Signature-Version' : project. fjVersion
104+ name = ' Functional Java'
105+ instruction ' Signature-Version' , project. fjVersion
106+ instruction ' Bundle-ActivationPolicy' , ' lazy'
107+ instruction ' Bundle-Vendor' , ' functionaljava.org'
108+ if (project. name != " core" ) {
109+ instruction ' Require-Bundle' , ' org.functionaljava;bundle-version="' + project. fjBaseVersion+ ' "'
110+ }
99111 }
100112 }
101113
114+ eclipse {
115+ project {
116+ natures ' org.eclipse.pde.PluginNature'
117+ buildCommand ' org.eclipse.pde.ManifestBuilder'
118+ buildCommand ' org.eclipse.pde.SchemaBuilder'
119+ }
120+ }
121+
122+ // Output MANIFEST.MF statically so eclipse can see it for plugin development
123+ task eclipsePluginManifest(dependsOn : jar) << {
124+ file(" META-INF" ). mkdirs()
125+ jar. manifest. writeTo(file(" META-INF/MANIFEST.MF" ))
126+ }
127+
128+ eclipseProject. dependsOn eclipsePluginManifest
102129}
103130
131+
104132task wrapper (type : Wrapper ) {
105133 gradleVersion = ' 2.0'
106134}
0 commit comments