File tree Expand file tree Collapse file tree 10 files changed +72
-20
lines changed
flapi-build-plugin/src/main/java/unquietcode/tools/flapi/plugin
flapi-build-test-consumer
flapi-build-test-producer
main/java/unquietcode/tools/flapi/plugin
test/java/unquietcode/tools/flapi/plugin
flapi-gradle-plugin/src/main/groovy/unquietcode/tools/flapi/plugin
flapi-plugin/src/main/java/unquietcode/tools/flapi/plugin Expand file tree Collapse file tree 10 files changed +72
-20
lines changed Original file line number Diff line number Diff line change 1
1
/*********************************************************************
2
- Copyright 2014 the Flapi authors
2
+ Copyright 2018 the Flapi authors
3
3
4
4
Licensed under the Apache License, Version 2.0 (the "License");
5
5
you may not use this file except in compliance with the License.
43
43
*/
44
44
@ Mojo (
45
45
name ="generate" ,
46
- defaultPhase =LifecyclePhase .PROCESS_TEST_CLASSES ,
47
- requiresDependencyResolution =ResolutionScope .TEST
46
+ defaultPhase =LifecyclePhase .PROCESS_CLASSES ,
47
+ requiresDependencyResolution =ResolutionScope .COMPILE
48
48
)
49
49
public class FlapiBuildPlugin extends AbstractMojo {
50
50
Original file line number Diff line number Diff line change 74
74
</repository >
75
75
</distributionManagement >
76
76
77
+ <dependencies >
78
+ <dependency >
79
+ <groupId >com.unquietcode.tools.flapi</groupId >
80
+ <artifactId >flapi</artifactId >
81
+ <version >${project.version} </version >
82
+ <scope >provided</scope >
83
+ </dependency >
84
+ </dependencies >
85
+
77
86
<profiles >
78
87
<profile >
79
88
<id >gpg</id >
191
200
<goals >
192
201
<goal >add-source</goal >
193
202
</goals >
194
- <phase >generate-test-sources </phase >
203
+ <phase >process-classes </phase >
195
204
<configuration >
196
205
<sources >
197
206
<source >${flapi.generated.sources} </source >
202
211
</plugin >
203
212
</plugins >
204
213
</build >
205
- </project >
214
+ </project >
Original file line number Diff line number Diff line change @@ -5,12 +5,14 @@ group = 'com.unquietcode.tools.flapi.test'
5
5
version = ' 0.0-DEVELOPMENT'
6
6
sourceCompatibility = ' 1.8'
7
7
8
+ install. dependsOn test
9
+
8
10
repositories {
9
11
mavenCentral()
10
12
mavenLocal()
11
13
}
12
14
13
15
dependencies {
14
- compile ' com.unquietcode.tools.flapi.test:flapi-gradle-test-producer:0.0-DEVELOPMENT'
15
- testCompile ' junit:junit:4.11'
16
+ implementation ' com.unquietcode.tools.flapi.test:flapi-gradle-test-producer:0.0-DEVELOPMENT'
17
+ testImplementation ' junit:junit:4.11'
16
18
}
Original file line number Diff line number Diff line change 24
24
<plugin >
25
25
<groupId >org.apache.maven.plugins</groupId >
26
26
<artifactId >maven-deploy-plugin</artifactId >
27
+ <version >2.8.2</version >
27
28
<configuration >
28
29
<skip >true</skip >
29
30
</configuration >
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ repositories {
27
27
}
28
28
29
29
dependencies {
30
+ compileOnly ' com.unquietcode.tools.flapi:flapi:0.0-DEVELOPMENT'
30
31
testCompile ' com.unquietcode.tools.flapi:flapi:0.0-DEVELOPMENT'
31
32
}
32
33
Original file line number Diff line number Diff line change 21
21
<flapi .includeRuntime>true</flapi .includeRuntime>
22
22
</properties >
23
23
24
- <dependencies >
25
- <dependency >
26
- <groupId >com.unquietcode.tools.flapi</groupId >
27
- <artifactId >flapi</artifactId >
28
- <version >${project.version} </version >
29
- <scope >test</scope >
30
- </dependency >
31
- </dependencies >
32
-
33
24
<build >
34
25
<plugins >
35
26
<plugin >
36
27
<groupId >org.apache.maven.plugins</groupId >
37
28
<artifactId >maven-deploy-plugin</artifactId >
29
+ <version >2.8.2</version >
38
30
<configuration >
39
31
<skip >true</skip >
40
32
</configuration >
41
33
</plugin >
42
34
</plugins >
43
35
</build >
44
36
45
- </project >
37
+ </project >
Original file line number Diff line number Diff line change
1
+ /*********************************************************************
2
+ Copyright 2018 the Flapi authors
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a basicCopy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ ********************************************************************/
16
+
1
17
package unquietcode .tools .flapi .plugin ;
2
18
3
19
import unquietcode .tools .flapi .Descriptor ;
Original file line number Diff line number Diff line change
1
+ /*********************************************************************
2
+ Copyright 2018 the Flapi authors
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a basicCopy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ ********************************************************************/
16
+
17
+ package unquietcode .tools .flapi .plugin ;
18
+
19
+ import unquietcode .tools .flapi .Descriptor ;
20
+
21
+ /**
22
+ * @author Ben Fagin
23
+ * @version 2018-05-13
24
+ */
25
+ public class TestDescriptorTest {
26
+
27
+ public static void main (String [] args ) {
28
+ Descriptor descriptor = new TestDescriptor ().descriptor ();
29
+ descriptor .writeToStream (System .out );
30
+ }
31
+ }
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public class GradlePlugin implements Plugin<Project> {
90
90
List<URL > urls = new ArrayList<> ();
91
91
92
92
// dependencies
93
- for (def path : project. configurations[' testCompile ' ]) {
93
+ for (def path : project. configurations[' compile ' ]) {
94
94
urls. add(path. toURI(). toURL())
95
95
}
96
96
Original file line number Diff line number Diff line change @@ -125,13 +125,13 @@ else if (descriptor instanceof Class) {
125
125
126
126
// handle DescriptorMaker instances
127
127
else if (DescriptorMaker .class .isAssignableFrom (descriptor .getClass ())) {
128
- logInfo ("processing descriptor" );
128
+ logInfo ("processing descriptor " + descriptor . getClass (). getName () );
129
129
processDescriptor (classloader (), (DescriptorMaker ) descriptor );
130
130
}
131
131
132
132
// handle Descriptor instances
133
133
else if (Descriptor .class .isAssignableFrom (descriptor .getClass ())) {
134
- logInfo ("processing descriptor" );
134
+ logInfo ("processing descriptor " + descriptor . getClass (). getName () );
135
135
processDescriptor (classloader (), (Descriptor ) descriptor );
136
136
}
137
137
You can’t perform that action at this time.
0 commit comments