@@ -14,6 +14,8 @@ if (JavaVersion.current().isJava8Compatible()) {
14
14
15
15
allprojects {
16
16
17
+ defaultTasks " build"
18
+
17
19
ext {
18
20
isSnapshot = true
19
21
fjBaseVersion = " 4.3"
@@ -45,34 +47,38 @@ allprojects {
45
47
46
48
version = fjVersion
47
49
group = " org.functionaljava"
50
+
48
51
}
49
52
50
53
subprojects {
51
54
52
- defaultTasks " build"
55
+ buildscript {
56
+ repositories {
57
+ mavenCentral()
58
+ }
53
59
54
- buildscript {
55
- repositories {
56
- mavenCentral()
57
- }
60
+ dependencies {
61
+ classpath ' me.tatarka:gradle-retrolambda:2.5.0 '
62
+ }
63
+ }
58
64
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"
63
68
64
- repositories {
65
- mavenCentral()
69
+ repositories {
70
+ mavenCentral()
66
71
maven {
67
72
url sonatypeRepositoryUrl
68
73
}
69
-
70
74
}
75
+ }
76
+
77
+ configure(subprojects. findAll {it. name != ' tests' }) {
71
78
72
- apply from : " $rootDir /lib.gradle"
73
79
apply plugin : " maven"
74
- apply plugin : " java"
75
80
apply plugin : " signing"
81
+ apply plugin : " osgi"
76
82
77
83
sourceCompatibility = " 1.8"
78
84
@@ -95,12 +101,34 @@ subprojects {
95
101
jar {
96
102
version project. fjVersion
97
103
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
+ }
99
111
}
100
112
}
101
113
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
102
129
}
103
130
131
+
104
132
task wrapper (type : Wrapper ) {
105
133
gradleVersion = ' 2.0'
106
134
}
0 commit comments