File tree 8 files changed +158
-3
lines changed
avaje-config/src/main/resources/META-INF/native-image/io.avaje.config.avaje-config
8 files changed +158
-3
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,7 @@ indent_style = space
10
10
insert_final_newline = true
11
11
trim_trailing_whitespace = true
12
12
spaces_around_operators = true
13
+
14
+ [* .json ]
15
+ indent_size = 1
16
+ indent_style = space
Original file line number Diff line number Diff line change
1
+ name : avaje-config native image
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ - cron : ' 40 0 1 1 6'
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ${{ matrix.os }}
11
+ permissions :
12
+ contents : read
13
+ packages : write
14
+ strategy :
15
+ fail-fast : true
16
+ matrix :
17
+ os : [ubuntu-latest]
18
+
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - uses : graalvm/setup-graalvm@v1
22
+ with :
23
+ java-version : ' 21'
24
+ distribution : ' graalvm'
25
+ cache : ' maven'
26
+ github-token : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Versions
29
+ run : |
30
+ echo "GRAALVM_HOME: $GRAALVM_HOME"
31
+ echo "JAVA_HOME: $JAVA_HOME"
32
+ java --version
33
+ native-image --version
34
+ - name : Build with Maven
35
+ run : |
36
+ mvn clean install -DskipTests
37
+ cd tests/test-native-image
38
+ mvn clean package -Pnative
39
+ ./target/test-native
Original file line number Diff line number Diff line change
1
+ {
2
+ "resources" : [
3
+ {
4
+ "pattern" : " application.properties"
5
+ },
6
+ {
7
+ "pattern" : " application.yaml"
8
+ },
9
+ {
10
+ "pattern" : " application.yml"
11
+ }
12
+ ]
13
+ }
Original file line number Diff line number Diff line change 4
4
<parent >
5
5
<groupId >org.avaje</groupId >
6
6
<artifactId >java11-oss</artifactId >
7
- <version >3.10</version >
7
+ <version >3.12</version >
8
+ <relativePath />
8
9
</parent >
9
10
10
11
<groupId >io.avaje</groupId >
11
- <artifactId >avaje -config-reactor</artifactId >
12
+ <artifactId >tests -config-reactor</artifactId >
12
13
<version >1</version >
13
14
<packaging >pom</packaging >
14
- <name >avaje config reactor</name >
15
15
16
16
<modules >
17
17
<module >avaje-config</module >
18
+ <!-- <module>tests</module>-->
18
19
</modules >
19
20
21
+ <!-- <profiles>-->
22
+ <!-- <profile>-->
23
+ <!-- <id>central</id>-->
24
+ <!-- </profile>-->
25
+ <!-- <profile>-->
26
+ <!-- <id>native</id>-->
27
+ <!-- <modules>-->
28
+ <!-- <module>tests</module>-->
29
+ <!-- </modules>-->
30
+ <!-- </profile>-->
31
+ <!-- </profiles>-->
32
+
20
33
</project >
21
34
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3
+ <modelVersion >4.0.0</modelVersion >
4
+ <parent >
5
+ <groupId >org.avaje</groupId >
6
+ <artifactId >java11-oss</artifactId >
7
+ <version >3.12</version >
8
+ <relativePath />
9
+ </parent >
10
+
11
+ <artifactId >tests</artifactId >
12
+ <packaging >pom</packaging >
13
+
14
+ <modules >
15
+ <module >test-native-image</module >
16
+ </modules >
17
+
18
+ </project >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <groupId >org.example</groupId >
8
+ <artifactId >test-native</artifactId >
9
+ <version >1.0-SNAPSHOT</version >
10
+
11
+ <properties >
12
+ <maven .compiler.release>21</maven .compiler.release>
13
+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
14
+ <version .plugin.nativeimage>0.9.27</version .plugin.nativeimage>
15
+ <mainClass >org.example.Main</mainClass >
16
+ </properties >
17
+
18
+ <dependencies >
19
+ <dependency >
20
+ <groupId >io.avaje</groupId >
21
+ <artifactId >avaje-config</artifactId >
22
+ <version >3.9-SNAPSHOT</version >
23
+ </dependency >
24
+ </dependencies >
25
+
26
+ <profiles >
27
+ <profile >
28
+ <id >native</id >
29
+ <build >
30
+ <plugins >
31
+ <plugin >
32
+ <groupId >org.graalvm.buildtools</groupId >
33
+ <artifactId >native-maven-plugin</artifactId >
34
+ <version >${version.plugin.nativeimage} </version >
35
+ <executions >
36
+ <execution >
37
+ <id >build-native</id >
38
+ <goals >
39
+ <goal >build</goal >
40
+ </goals >
41
+ <phase >package</phase >
42
+ <configuration >
43
+ <buildArgs >
44
+ <buildArg >--no-fallback</buildArg >
45
+ <buildArg >--allow-incomplete-classpath</buildArg >
46
+ </buildArgs >
47
+ </configuration >
48
+ </execution >
49
+ </executions >
50
+ </plugin >
51
+ </plugins >
52
+ </build >
53
+ </profile >
54
+ </profiles >
55
+
56
+ </project >
Original file line number Diff line number Diff line change
1
+ package org .example ;
2
+
3
+ import io .avaje .config .Config ;
4
+
5
+ public class Main {
6
+
7
+ public static void main (String [] args ) {
8
+ String val = Config .get ("hello.world" , "not-set" );
9
+ System .out .println ("Hello - " + val );
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ hello.world =Rob
You can’t perform that action at this time.
0 commit comments