Skip to content

Commit

Permalink
Changed iOS to use cocoapods to fix issue with exporting in Xcode 7. …
Browse files Browse the repository at this point in the history
  • Loading branch information
shannah committed Dec 18, 2017
1 parent ad768f8 commit cec90a2
Show file tree
Hide file tree
Showing 13 changed files with 121 additions and 1,398 deletions.
133 changes: 84 additions & 49 deletions CN1Flurry/build.xml
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--build_version=1.4-->


<!--build_version=3.0-->
<!--
This build script was generated by Codename One to build native mobile applications using Java.
To learn more about Codename One go to https://www.codenameone.com/
-->


<project name="CN1Flurry" default="default" basedir=".">
<description>Builds, tests, and runs the project CN1Flurry.</description>
<import file="nbproject/build-impl.xml"/>
Expand All @@ -10,9 +14,9 @@
<target depends="init,compile,jar" name="compile-test">
</target>

<target depends="compile-test" name="-do-test-run">
<target depends="compile-test" name="-do-test-run">
</target>

<target depends="-do-test-run" description="Run unit tests." name="test">
<echo>Currently testing a library project isn't supported</echo>
</target>
Expand All @@ -22,18 +26,18 @@
code size and wider device support</echo>
<mkdir dir="build/tmp"/>
<javac destdir="build/tmp"
source="1.5"
target="1.5"
source="1.8"
target="1.8"
bootclasspath="lib/CLDC11.jar"
classpath="${javac.classpath}:${build.classes.dir}">
<src path="${src.dir}"/>
</javac>
</javac>
</target>


<target name="-pre-init">
<property name="javac.source" value="1.5" />
<property name="javac.target" value="1.5" />
<property name="javac.source" value="1.8" />
<property name="javac.target" value="1.8" />
</target>

<target name="run">
Expand All @@ -49,7 +53,7 @@
<javadoc sourcepath="src"
classpath="lib/CodenameOne.jar:lib/CLDC11.jar"
docletpath="Stubber.jar"
doclet="com.codename1.build.client.StubGenerator">
doclet="com.codename1.build.client.StubGenerator">
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
Expand All @@ -61,28 +65,35 @@
<zip basedir="${build.classes.dir}" compress="false" destfile="build/lib/main.zip" />
<zip basedir="build/stubs" compress="false" destfile="build/lib/stubs.zip" />
<copy file="manifest.properties" todir="build/lib" />
<antcall target="buildNativeIOS" />
<antcall target="buildNativeRIM" />
<antcall target="buildNativeAND" />
<antcall target="buildNativeSE" />
<antcall target="buildNativeWIN" />
<antcall target="buildNativeME" />
<copy file="codenameone_library_appended.properties" todir="build/lib" />
<copy file="codenameone_library_required.properties" todir="build/lib" />
<antcall target="buildNativeIOS" />
<antcall target="buildNativeRIM" />
<antcall target="buildNativeAND" />
<antcall target="buildNativeSE" />
<antcall target="buildNativeWIN" />
<antcall target="buildNativeME" />
<antcall target="buildNativeJS" />
<mkdir dir="dist" />
<zip basedir="build/lib" compress="true" destfile="dist/${application.title}.cn1lib" />
<!--
<copy file="dist/${application.title}.cn1lib" tofile="/Users/shannah/cn1_files/incubator/FlurryDemo/lib/CN1Flurry.cn1lib" overwrite="true"/>
<ant dir="/Users/shannah/cn1_files/incubator/FlurryDemo" usenativebasedir="true" target="refresh-libs"/>
-->
</target>

<target name="buildNativeRIM">
<path id="rimNativeDir">
<fileset dir="native/rim"/>
</path>
<property name="test.rimDir.property" refid="rimNativeDir"/>
</path>
<property name="test.rimDir.property" refid="rimNativeDir"/>
<condition property="doesntHaveRimFiles">
<equals arg1="" arg2="${test.rimDir.property}"/>
</condition>
</condition>

<antcall target="createRimZip" />
<antcall target="createRimZip" />
</target>

<target name="createRimZip"
unless="doesntHaveRimFiles">
<echo>Zipping rim native code</echo>
Expand All @@ -92,32 +103,36 @@
<target name="buildNativeAND">
<path id="andNativeDir">
<fileset dir="native/android"/>
</path>
<property name="test.andDir.property" refid="andNativeDir"/>
</path>
<property name="test.andDir.property" refid="andNativeDir"/>
<condition property="doesntHaveAndFiles">
<equals arg1="" arg2="${test.andDir.property}"/>
</condition>
</condition>

<antcall target="createAndZip" />
<antcall target="createAndZip" />
</target>

<target name="buildNativeSE">
<mkdir dir="native/javase" />
<path id="seNativeDir">
<fileset dir="native/javase"/>
</path>
<property name="test.seDir.property" refid="seNativeDir"/>
</path>
<property name="test.seDir.property" refid="seNativeDir"/>
<condition property="doesntHaveSeFiles">
<equals arg1="" arg2="${test.seDir.property}"/>
</condition>
</condition>

<antcall target="createSeZip" />
<antcall target="createSeZip" />
</target>

<target name="createSeZip"
unless="doesntHaveSeFiles">
<echo>Zipping JavaSE native code</echo>
<zip basedir="native/javase" compress="false" destfile="build/lib/nativese.zip" />
<zip compress="false" destfile="build/lib/nativese.zip">
<fileset dir="native/javase" excludes="*.jar" />
<!-- Uncomment the line below if you have jar files in your Java SE native code -->
<!-- zipfileset src="native/javase/*.jar"/ -->
</zip>
</target>

<target name="createAndZip"
Expand All @@ -129,15 +144,15 @@
<target name="buildNativeWIN">
<path id="winNativeDir">
<fileset dir="native/win"/>
</path>
<property name="test.winDir.property" refid="winNativeDir"/>
</path>
<property name="test.winDir.property" refid="winNativeDir"/>
<condition property="doesntHaveWinFiles">
<equals arg1="" arg2="${test.winDir.property}"/>
</condition>
</condition>

<antcall target="createWinZip" />
<antcall target="createWinZip" />
</target>

<target name="createWinZip"
unless="doesntHaveWinFiles">
<echo>Zipping win native code</echo>
Expand All @@ -147,15 +162,15 @@
<target name="buildNativeIOS">
<path id="iosNativeDir">
<fileset dir="native/ios"/>
</path>
<property name="test.iosDir.property" refid="iosNativeDir"/>
</path>
<property name="test.iosDir.property" refid="iosNativeDir"/>
<condition property="doesntHaveIosFiles">
<equals arg1="" arg2="${test.iosDir.property}"/>
</condition>
</condition>

<antcall target="createIosZip" />
<antcall target="createIosZip" />
</target>

<target name="createIosZip"
unless="doesntHaveIosFiles">
<echo>Zipping ios native code</echo>
Expand All @@ -165,19 +180,39 @@
<target name="buildNativeME">
<path id="meNativeDir">
<fileset dir="native/j2me"/>
</path>
<property name="test.meDir.property" refid="meNativeDir"/>
</path>
<property name="test.meDir.property" refid="meNativeDir"/>
<condition property="doesntHaveMeFiles">
<equals arg1="" arg2="${test.meDir.property}"/>
</condition>
</condition>

<antcall target="createMeZip" />
<antcall target="createMeZip" />
</target>

<target name="createMeZip"
unless="doesntHaveMeFiles">
<echo>Zipping me native code</echo>
<zip basedir="native/j2me" compress="false" destfile="build/lib/nativeme.zip" />
</target>



<target name="buildNativeJS">
<mkdir dir="native/javascript"/>
<path id="jsNativeDir">
<fileset dir="native/javascript"/>
</path>
<property name="test.jsDir.property" refid="jsNativeDir"/>
<condition property="doesntHaveJsFiles">
<equals arg1="" arg2="${test.jsDir.property}"/>
</condition>

<antcall target="createJsZip" />
</target>

<target name="createJsZip"
unless="doesntHaveJsFiles">
<echo>Zipping javascript native code</echo>
<zip basedir="native/javascript" compress="false" destfile="build/lib/nativejavascript.zip" />
</target>

</project>
1 change: 1 addition & 0 deletions CN1Flurry/codenameone_library_appended.properties
@@ -0,0 +1 @@
codename1.arg.ios.pods=,Flurry-iOS-SDK/FlurrySDK,Flurry-iOS-SDK/FlurryAds
3 changes: 3 additions & 0 deletions CN1Flurry/codenameone_library_required.properties
@@ -0,0 +1,3 @@
#
#Mon Dec 18 05:12:19 PST 2017
codename1.arg.java.version=8
Binary file modified CN1Flurry/dist/CN1Flurry.cn1lib
Binary file not shown.

0 comments on commit cec90a2

Please sign in to comment.