Skip to content

Commit 522d67a

Browse files
committed
Refactored directories to have a proper maven project.
1 parent 35f0758 commit 522d67a

32 files changed

+1758
-2192
lines changed

.github/scripts/build-thirdparty-app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function build_target() {
8989

9090
# Use cn1:build to generate native sources
9191
"$mvn_cmd" "${mvn_args[@]}" cn1:build
92-
popd
92+
popd
9393
}
9494

9595
build_target

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ jobs:
6767
6868
if [[ -z "$GRADLE_ROOT" ]]; then
6969
echo "Error: Gradle project not found in BTDemo/target"
70-
echo "Listing BTDemo/target recursively:"
71-
ls -R BTDemo/target
70+
echo "Listing directories recursively:"
71+
ls -R .
7272
exit 1
7373
fi
7474

BTDemo/CodeNameOneBuildClient.jar

-1.28 MB
Binary file not shown.

BTDemo/JavaSE.jar

-20.8 MB
Binary file not shown.

BTDemo/android/pom.xml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
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>com.codenameone.examples.hellocodenameone</groupId>
6+
<artifactId>hellocodenameone</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
</parent>
9+
<groupId>com.codenameone.examples.hellocodenameone</groupId>
10+
<artifactId>hellocodenameone-android</artifactId>
11+
<version>1.0-SNAPSHOT</version>
12+
13+
<name>hellocodenameone-android</name>
14+
15+
<properties>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
<codename1.platform>android</codename1.platform>
20+
<codename1.projectPlatform>android</codename1.projectPlatform>
21+
<codename1.defaultBuildTarget>android-device</codename1.defaultBuildTarget>
22+
</properties>
23+
<build>
24+
<sourceDirectory>src/main/empty</sourceDirectory>
25+
<resources>
26+
27+
<resource>
28+
<directory>src/main/java</directory>
29+
</resource>
30+
<resource>
31+
<directory>src/main/resources</directory>
32+
</resource>
33+
</resources>
34+
<plugins>
35+
<plugin>
36+
<groupId>com.codenameone</groupId>
37+
<artifactId>codenameone-maven-plugin</artifactId>
38+
<version>${cn1.plugin.version}</version>
39+
<executions>
40+
<execution>
41+
<id>build-android</id>
42+
<phase>package</phase>
43+
<goals>
44+
<goal>build</goal>
45+
</goals>
46+
</execution>
47+
</executions>
48+
</plugin>
49+
50+
</plugins>
51+
</build>
52+
53+
<dependencies>
54+
<dependency>
55+
<groupId>com.codenameone</groupId>
56+
<artifactId>codenameone-core</artifactId>
57+
<scope>provided</scope>
58+
</dependency>
59+
<dependency>
60+
<groupId>${project.groupId}</groupId>
61+
<artifactId>${cn1app.name}-common</artifactId>
62+
<version>${project.version}</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>${project.groupId}</groupId>
66+
<artifactId>${cn1app.name}-common</artifactId>
67+
<version>${project.version}</version>
68+
<classifier>tests</classifier>
69+
<scope>test</scope>
70+
</dependency>
71+
72+
</dependencies>
73+
74+
<profiles>
75+
<profile>
76+
<id>run-android</id>
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<groupId>org.codehaus.mojo</groupId>
81+
<artifactId>properties-maven-plugin</artifactId>
82+
<version>1.0.0</version>
83+
<executions>
84+
<execution>
85+
<phase>initialize</phase>
86+
<goals>
87+
<goal>read-project-properties</goal>
88+
</goals>
89+
<configuration>
90+
<files>
91+
<file>${basedir}/../common/codenameone_settings.properties</file>
92+
</files>
93+
</configuration>
94+
</execution>
95+
</executions>
96+
</plugin>
97+
98+
<plugin>
99+
<artifactId>maven-antrun-plugin</artifactId>
100+
<executions>
101+
<execution>
102+
<id>adb-install</id>
103+
<phase>verify</phase>
104+
<goals>
105+
<goal>run</goal>
106+
</goals>
107+
<configuration>
108+
<target>
109+
<echo>Running adb install</echo>
110+
<exec executable="${env.ANDROID_HOME}/platform-tools/adb" failonerror="true">
111+
<arg value="install"/>
112+
<arg value="-r"/>
113+
<arg value="${project.build.directory}/${project.build.finalName}.apk"/>
114+
</exec>
115+
116+
<echo>Trying to start app on device using adb</echo>
117+
<exec executable="${env.ANDROID_HOME}/platform-tools/adb" failonerror="true">
118+
<arg value="shell"/>
119+
<arg value="am" />
120+
<arg value="start" />
121+
<arg value="-n" />
122+
<arg value="${codename1.packageName}/.${codename1.mainName}Stub"/>
123+
</exec>
124+
</target>
125+
</configuration>
126+
</execution>
127+
</executions>
128+
</plugin>
129+
</plugins>
130+
</build>
131+
</profile>
132+
</profiles>
133+
134+
</project>

0 commit comments

Comments
 (0)