Skip to content

Commit

Permalink
Removed requirement to download cn1-binaries. When building the andro…
Browse files Browse the repository at this point in the history
…id project you can specify -Dcn1.binaries=path/to/cn1-binaries in order to compile the android sources and bundle them as a jar with dependencies that can be used as a dependency when working on android namtive projects.
  • Loading branch information
shannah committed Jan 27, 2021
1 parent 69a4152 commit c59111f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 36 deletions.
49 changes: 35 additions & 14 deletions maven/android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,41 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>6</maven.compiler.source>
<maven.compiler.target>6</maven.compiler.target>
<src.dir>../../Ports/Android/src</src.dir>
<src.dir>src/main/java</src.dir>
<real.src.dir>../../Ports/Android/src</real.src.dir>
<android.sdk.version>25.3.0</android.sdk.version>
<cn1.binaries>${maven.multiModuleProjectDirectory}/target/cn1-binaries</cn1.binaries>
</properties>

<build>
<sourceDirectory>${src.dir}</sourceDirectory>
<resources>
<resource>
<directory>${src.dir}</directory>
</resource>
</resources>
<plugins>

</plugins>
</build>


<profiles>

<profile>
<id>cn1-binaries</id>
<activation>
<property><name>java.home</name></property>
<activeByDefault>true</activeByDefault>
</activation>
<id>bundle-android</id>

<build>


<resources>
<resource>
<directory>${real.src.dir}</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>compile-android</id>
<activation>
<file><exists>${cn1.binaries}</exists></file>
<property><name>cn1.binaries</name></property>
</activation>
<properties>
<src.dir>../../Ports/Android/src</src.dir>
</properties>
<dependencies>
<dependency>
<groupId>com.codenameone.cn1binaries</groupId>
Expand Down Expand Up @@ -192,8 +202,19 @@
<systemPath>${cn1.binaries}/android/play-services-tasks-12.0.0.jar</systemPath>
</dependency>
</dependencies>

<build>


<resources>
<resource>
<directory>${src.dir}</directory>
</resource>
</resources>


<plugins>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
Expand Down
Empty file.
23 changes: 1 addition & 22 deletions maven/designer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,27 +134,7 @@
</resource>
</resources>
<plugins>

</plugins>
</build>


<profiles>
<profile>
<id>cn1-binaries</id>
<activation>
<file>
<exists>${maven.multiModuleProjectDirectory}/target/cn1-binaries</exists>
</file>
</activation>
<properties>
<cn1.binaries>${maven.multiModuleProjectDirectory}/target/cn1-binaries</cn1.binaries>
</properties>
<dependencies>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -231,7 +211,6 @@
</plugin>
</plugins>
</build>
</profile>
</profiles>


</project>
2 changes: 2 additions & 0 deletions maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
</pluginRepositories>
<profiles>

<!--
<profile>
<id>download-cn1-binaries</id>
<activation>
Expand Down Expand Up @@ -391,6 +392,7 @@
</dependencies>
</dependencyManagement>
</profile>
-->
<profile>
<id>tests</id>
<modules>
Expand Down

0 comments on commit c59111f

Please sign in to comment.