File tree 6 files changed +80
-4
lines changed
6 files changed +80
-4
lines changed Original file line number Diff line number Diff line change 3
3
<classpathentry kind =" src" path =" src/main/java" />
4
4
<classpathentry kind =" lib" path =" build_result/j2objc_annotations.jar" />
5
5
<classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER" />
6
- <classpathentry kind =" output" path =" build_result/eclipse" />
6
+ <classpathentry kind =" output" path =" build_result/eclipse" />
7
7
</classpath >
Original file line number Diff line number Diff line change
1
+ /target
Original file line number Diff line number Diff line change @@ -25,17 +25,26 @@ DIST_JAR = $(DIST_JAR_DIR)/$(JAR_NAME)
25
25
26
26
CLASSES_DIR = $(BUILD_DIR ) /classes
27
27
JAVA_SOURCE_DIR = src/main/java
28
+ JAVA9_CLASSES_DIR = $(BUILD_DIR ) /classes-java9
29
+ JPMS_CLASS = $(JAVA9_CLASSES_DIR ) /module-info.class
28
30
29
31
SOURCE_JAVA_FULL = $(ANNOTATION_SOURCE_JAVA:%=$(JAVA_SOURCE_DIR ) /% )
32
+ SOURCE_JAVA9_MODULE = $(ANNOTATION_MODULE_INFO:%=$(JAVA_SOURCE_DIR ) /% )
30
33
31
- $(BUILD_DIR ) $(CLASSES_DIR ) $(DIST_JAR_DIR ) :
34
+ $(BUILD_DIR ) $(CLASSES_DIR ) $(JAVA9_CLASSES_DIR ) $( DIST_JAR_DIR ) :
32
35
@mkdir -p $@
33
36
34
- $(JAR ) : $(SOURCE_JAVA_FULL ) | $(BUILD_DIR ) $(CLASSES_DIR )
37
+ $(JPMS_CLASS ) :
38
+ @echo Building j2objc annotations JPMS module
39
+ @$(JAVAC ) -sourcepath $(JAVA_SOURCE_DIR ) -encoding UTF-8 --release 9 -d $(JAVA9_CLASSES_DIR ) \
40
+ -nowarn $(SOURCE_JAVA9_MODULE )
41
+ @rm -fr $(JAVA9_CLASSES_DIR ) /com
42
+
43
+ $(JAR ) : $(SOURCE_JAVA_FULL ) | $(BUILD_DIR ) $(CLASSES_DIR ) $(JAVA9_CLASSES_DIR ) $(JPMS_CLASS )
35
44
@echo Building j2objc annotations
36
45
@$(JAVAC ) -encoding UTF-8 -d $(CLASSES_DIR ) -source 1.8 -target 1.8 \
37
46
-nowarn $^
38
- @jar cf $(JAR ) -C $(CLASSES_DIR ) .
47
+ @jar cf $(JAR ) -C $(CLASSES_DIR ) . --release 9 -C $( JAVA9_CLASSES_DIR ) .
39
48
40
49
$(DIST_JAR ) : $(JAR ) | $(DIST_JAR_DIR )
41
50
@install -m 0644 $< $@
Original file line number Diff line number Diff line change 10
10
# See the License for the specific language governing permissions and
11
11
# limitations under the License.
12
12
13
+ ANNOTATION_MODULE_INFO = \
14
+ module-info.java
15
+
13
16
ANNOTATION_SOURCE_JAVA = \
14
17
com/google/j2objc/annotations/AutoreleasePool.java \
15
18
com/google/j2objc/annotations/GenerateObjectiveCGenerics.java \
Original file line number Diff line number Diff line change 58
58
59
59
<build >
60
60
<plugins >
61
+ <plugin >
62
+ <groupId >org.apache.maven.plugins</groupId >
63
+ <artifactId >maven-compiler-plugin</artifactId >
64
+ <version >3.12.1</version >
65
+ <executions >
66
+ <execution >
67
+ <id >default-compile</id >
68
+ <configuration >
69
+ <source >1.8</source >
70
+ <target >1.8</target >
71
+ <excludes >
72
+ <exclude >module-info.java</exclude >
73
+ </excludes >
74
+ </configuration >
75
+ </execution >
76
+ <execution >
77
+ <id >compile-java9</id >
78
+ <phase >compile</phase >
79
+ <goals >
80
+ <goal >compile</goal >
81
+ </goals >
82
+ <configuration >
83
+ <release >9</release >
84
+ <multiReleaseOutput >true</multiReleaseOutput >
85
+ </configuration >
86
+ </execution >
87
+ </executions >
88
+ </plugin >
89
+ <plugin >
90
+ <groupId >org.apache.maven.plugins</groupId >
91
+ <artifactId >maven-jar-plugin</artifactId >
92
+ <version >3.3.0</version >
93
+ <configuration >
94
+ <archive >
95
+ <manifestEntries >
96
+ <Multi-Release >true</Multi-Release >
97
+ </manifestEntries >
98
+ </archive >
99
+ <excludes >
100
+ <exclude >META-INF/versions/9/com/**</exclude >
101
+ </excludes >
102
+ </configuration >
103
+ </plugin >
61
104
<plugin >
62
105
<groupId >org.apache.maven.plugins</groupId >
63
106
<artifactId >maven-javadoc-plugin</artifactId >
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2012 Google Inc. All Rights Reserved.
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 copy 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
+ open module com .google .j2objc .annotations {
18
+ requires java .base ;
19
+ exports com .google .j2objc .annotations ;
20
+ }
You can’t perform that action at this time.
0 commit comments