Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tuarua committed Aug 1, 2019
1 parent 3f8c38a commit d797c18
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 31 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
### 1.2.0
- AND: Updated to FreKotlin 1.8.0
- Updated to AIR 33 ARM 64bit
- Remove Android-x86

### 1.1.0
- Upgraded to AIR 32.0.0.116
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ You will also need to include the following in your app manifest. Update accordi
</manifest>
```

#### AIR 32 & 33
This ANE is built against AIR 33 SDK. If you wish to use with AIR 32 you will need to replace dx.jar in lib/android/bin/ with [this one](https://github.com/tuarua/Android-ANE-Dependencies/blob/master/AIR32_patch/lib/android/bin/dx.jar?raw=true)

-------------

## iOS
Expand All @@ -53,12 +56,15 @@ bash get_ios_dependencies.sh
This folder, ios_dependencies/device/Frameworks, must be packaged as part of your app when creating the ipa. How this is done will depend on the IDE you are using.
After the ipa is created unzip it and confirm there is a "Frameworks" folder in the root of the .app package.

#### AIR 32 & 33
You should use AIR 32 for iOS builds

### Prerequisites

You will need:

- IntelliJ IDEA / Flash Builder
- AIR 33 or greater
- AIR 32 or greater
- Android Studio 3 if you wish to edit the Android source
- Xcode 10.1
- wget on macOS
Expand Down
18 changes: 6 additions & 12 deletions example/VibrationANESample.iml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<option name="additionalOptions" value="-swf-version=44" />
</compiler-options>
<packaging-air-desktop />
<packaging-android enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="Main">
<packaging-android enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app-android.xml" package-file-name="Main">
<files-to-package>
<FilePathAndPathInPackage file-path="$MODULE_DIR$/system/AppIcon83.5x83.5@2x~ipad.png" path-in-package="AppIcon83.5x83.5@2x~ipad.png" />
<FilePathAndPathInPackage file-path="$MODULE_DIR$/system/AppIcon76x76~ipad.png" path-in-package="AppIcon76x76~ipad.png" />
Expand All @@ -45,11 +45,8 @@
<entry library-name="VibrationANE" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.tuarua.frekotlin-1.8.0" library-level="project">
<dependency linkage="Merged" />
</entry>
</entries>
<sdk name="AIRSDK_33" />
<sdk name="AIRSDK_32" />
</dependencies>
<compiler-options>
<map>
Expand All @@ -58,7 +55,7 @@
</compiler-options>
<packaging-air-desktop />
<packaging-android use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Simulator" />
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Simulator">
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app-ios.xml" package-file-name="iOS_Simulator">
<files-to-package>
<FilePathAndPathInPackage file-path="$MODULE_DIR$/ios_dependencies/simulator" path-in-package="." />
<FilePathAndPathInPackage file-path="$MODULE_DIR$/src/Assets.car" path-in-package="Assets.car" />
Expand All @@ -76,11 +73,8 @@
<entry library-name="VibrationANE" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.tuarua.frekotlin-1.8.0" library-level="project">
<dependency linkage="Merged" />
</entry>
</entries>
<sdk name="AIRSDK_33" />
<sdk name="AIRSDK_32" />
</dependencies>
<compiler-options>
<map>
Expand All @@ -89,7 +83,7 @@
</compiler-options>
<packaging-air-desktop />
<packaging-android use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Device" />
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Device">
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app-ios.xml" package-file-name="iOS_Device">
<files-to-package>
<FilePathAndPathInPackage file-path="$MODULE_DIR$/ios_dependencies/device" path-in-package="." />
<FilePathAndPathInPackage file-path="$MODULE_DIR$/src/Assets.car" path-in-package="Assets.car" />
Expand All @@ -106,7 +100,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="AIRSDK_33" jdkType="Flex SDK Type (new)" />
<orderEntry type="jdk" jdkName="AIRSDK_32&#9;AIRSDK_33" jdkType="__CompositeFlexSdk__" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="starling" level="project" />
<orderEntry type="library" exported="" name="com.tuarua.frekotlin" level="project" />
Expand Down
44 changes: 44 additions & 0 deletions example/src/Main-app-android.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/33.0">

<id>com.tuarua.vibrationanesample</id>
<filename>VibrationANESample</filename>
<name>VibrationANESample</name>
<versionNumber>1.2.0</versionNumber>


<initialWindow>
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<aspectRatio>portrait</aspectRatio>
<autoOrients>false</autoOrients>
<fullScreen>true</fullScreen>
<renderMode>direct</renderMode>
<depthAndStencil>true</depthAndStencil>
<visible>true</visible>
</initialWindow>


<icon>
<image76x76>AppIcon76x76~ipad.png</image76x76>
<image120x120>[email protected]</image120x120>
<image152x152>AppIcon76x76@2x~ipad.png</image152x152>
<image167x167>AppIcon83.5x83.5@2x~ipad.png</image167x167>
<image180x180>[email protected]</image180x180>
</icon>


<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
</manifest>
]]></manifestAdditions>
</android>

<extensions>
<extensionID>com.tuarua.frekotlin</extensionID>
<extensionID>com.tuarua.VibrationANE</extensionID>
</extensions>
</application>
13 changes: 1 addition & 12 deletions example/src/Main-app.xml → example/src/Main-app-ios.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/33.0">
<application xmlns="http://ns.adobe.com/air/application/32.0">

<id>com.tuarua.vibrationanesample</id>
<filename>VibrationANESample</filename>
Expand All @@ -26,16 +26,6 @@
<image180x180>[email protected]</image180x180>
</icon>


<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
</manifest>
]]></manifestAdditions>
</android>
<!-- iOS specific capabilities -->
<iPhone>
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
Expand All @@ -55,7 +45,6 @@
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
<extensions>
<extensionID>com.tuarua.frekotlin</extensionID>
<extensionID>com.tuarua.VibrationANE</extensionID>
</extensions>
</application>
4 changes: 4 additions & 0 deletions native_extension/ane/build_mobile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ echo "Building ANE."
"$AIR_SDK"/bin/adt -package \
-target ane "$pathtome/$PROJECTNAME.ane" "$pathtome/extension_mobile.xml" \
-swc "$pathtome/$PROJECTNAME.swc" \
-platform Android-x86 \
-C "$pathtome/platforms/android" "library.swf" "classes.jar" \
com.tuarua.$PROJECTNAME-res/. \
-platformoptions "$pathtome/platforms/android/platform.xml" \
-platform Android-ARM \
-C "$pathtome/platforms/android" "library.swf" "classes.jar" \
com.tuarua.$PROJECTNAME-res/. \
Expand Down
7 changes: 7 additions & 0 deletions native_extension/ane/extension_mobile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<copyright>This work is licensed under Apache License, Copyright (c) 2018 Tua Rua Ltd.</copyright>
<versionNumber>1.2.0</versionNumber>
<platforms>
<platform name="Android-x86">
<applicationDeployment>
<nativeLibrary>classes.jar</nativeLibrary>
<initializer>com.tuarua.VibrationANE</initializer>
<finalizer>com.tuarua.VibrationANE</finalizer>
</applicationDeployment>
</platform>
<platform name="Android-ARM">
<applicationDeployment>
<nativeLibrary>classes.jar</nativeLibrary>
Expand Down
Binary file modified native_extension/bin/VibrationANE.swc
Binary file not shown.
6 changes: 3 additions & 3 deletions native_library/android/VibrationANE/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
<option name="PROJECT_TYPE" value="1" />
Expand All @@ -30,7 +30,7 @@
</compilerSettings>
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/build/tmp/kotlin-classes/debug" />
<option name="classpath" value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-android-extensions-runtime/1.3.40/42aede14a73c7406de95c252e8aa6100a82d4b61/kotlin-android-extensions-runtime-1.3.40.jar:/Users/eoinlandy/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.40/b8a521c687329303778548e2f09b0ba5b2665236/kotlin-stdlib-1.3.40.jar:/Users/eoinlandy/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.40/ff8f3da514fc2877d1303d55e22d6da8156c29fb/kotlin-stdlib-common-1.3.40.jar:/Users/eoinlandy/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/Users/eoinlandy/.gradle/caches/transforms-2/files-2.1/488cedef13021f9ee20da715718b05ae/jars/classes.jar:/Users/eoinlandy/.gradle/caches/transforms-2/files-2.1/488cedef13021f9ee20da715718b05ae/jars/libs/FlashRuntimeExtensions.jar:/Users/eoinlandy/.gradle/caches/transforms-2/files-2.1/488cedef13021f9ee20da715718b05ae/jars/libs/runtimeClasses.jar:/Users/eoinlandy/Library/Android/sdk/platforms/android-28/android.jar:/Users/eoinlandy/Library/Android/sdk/build-tools/28.0.3/core-lambda-stubs.jar" />
<option name="classpath" value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-android-extensions-runtime/1.3.40/42aede14a73c7406de95c252e8aa6100a82d4b61/kotlin-android-extensions-runtime-1.3.40.jar:/Users/eoinlandy/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.40/b8a521c687329303778548e2f09b0ba5b2665236/kotlin-stdlib-1.3.40.jar:/Users/eoinlandy/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.40/ff8f3da514fc2877d1303d55e22d6da8156c29fb/kotlin-stdlib-common-1.3.40.jar:/Users/eoinlandy/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/Users/eoinlandy/.gradle/caches/transforms-2/files-2.1/a606d408cf367798951c327c33d39720/jars/classes.jar:/Users/eoinlandy/.gradle/caches/transforms-2/files-2.1/a606d408cf367798951c327c33d39720/jars/libs/FlashRuntimeExtensions.jar:/Users/eoinlandy/.gradle/caches/transforms-2/files-2.1/a606d408cf367798951c327c33d39720/jars/libs/runtimeClasses.jar:/Users/eoinlandy/Library/Android/sdk/platforms/android-28/android.jar:/Users/eoinlandy/Library/Android/sdk/build-tools/28.0.3/core-lambda-stubs.jar" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="app_debug" />
Expand Down Expand Up @@ -169,7 +169,7 @@
</content>
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: com.tuarua:FreKotlin:1.8.0-beta1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.tuarua:FreKotlin:1.8.0@aar" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.3.40@jar" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.40@jar" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.40@jar" level="project" />
Expand Down
4 changes: 2 additions & 2 deletions native_library/android/VibrationANE/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

buildscript {
ext.kotlin_version = '1.3.40'
ext.frekotlin_version = '1.8.0-beta1'
ext.frekotlin_version = '1.8.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit d797c18

Please sign in to comment.