Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24532] Hyperloop: Android - Use .aar handling from AndroidBuilder

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-09-25T18:53:20.000+0000
Affected Version/sHyperloop 2.0.1
Fix Version/sHyperloop 2.2.0
ComponentsAndroid, Hyperloop
Labelsn/a
ReporterJan Vennemann
AssigneeJan Vennemann
Created2017-03-24T14:20:15.000+0000
Updated2017-10-04T21:37:37.000+0000

Description

In TIMOB-18565 the android build is updated to be able to process Android Libraries from .aar files. This is currently also handled in the Hyperloop plugin but is redundant once the other ticket gets resolved, so it can be removed from the plugin. However, a few adjustments to the Android plugin for Hyperloop are are necessary: * Remove .aar processing from plugin. * Receive .jar list from builder instance. With TIMOB-18565 this list will already contain all .jar files from any .aar inside the project.

Comments

  1. Jan Vennemann 2017-05-18

    [~hansknoechel], i moved this to 2.1.1 because there is a bug when using Hyperloop together with the new override feature for Android Support Libraries introduced in TIMOB-24446. Hyperloop stores it's own copy all JARs that need to be added to the Java class path. This list changes between the time Hyperloop first reads it and then passes it back to the dexer, causing duplicate class issues.
  2. Jan Vennemann 2017-05-26

    Moved back to 2.2.0 because i was able to solve the issues without the need for a new Hyperloop version.
  3. Jan Vennemann 2017-09-05

    PR: https://github.com/appcelerator/hyperloop.next/pull/206
  4. Jan Vennemann 2017-10-04

    [~lchoudhary], you can perform the following steps to verify this: *Test case 1: Project JAR Libraries* - Run the hyperloop-examples project and check that the HTTP Request completes successfully. This uses a .jar file in the project's app/platform/android folder *Test case 2: Project Android Libraries* - Run the hyperloop-examples project and make sure the third-party Shimmer view open correctly. This uses an .aar file in the project's app/platform/android folder *Test case 3: Module Android Libraries* - Download the Facebook module: https://github.com/appcelerator-modules/ti.facebook/releases/tag/android-6.3.0 - Place the module inside a test app and enable it in your tiapp.xml - Add the following to the custom manifest to tiapp.xml. This uses a dummy app id, causing an error to be displayed later on in the share dialog, which can be ignored.
       <manifest>
         <application>
           <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb1234"/>
           <activity android:name="com.facebook.FacebookActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="@string/app_name" />
         </application>
         <uses-permission android:name="android.permission.INTERNET" />
         <provider android:authorities="com.facebook.app.FacebookContentProvider1234"
           android:name="com.facebook.FacebookContentProvider"
           android:exported="true" />
       </manifest>
       
    - Open a Facebook share dialog via Hyperloop.
       var Activity = require('android.app.Activity');
       var ShareDialog = require('com.facebook.share.widget.ShareDialog');
       var ShareDialogMode = require('com.facebook.share.widget.ShareDialog.Mode');
       var ShareLinkContent = require('com.facebook.share.model.ShareLinkContent');
       var Uri = require('android.net.Uri');
       var shareContent = new ShareLinkContent.Builder()
         .setContentUrl(Uri.parse('http://www.appcelerator.com/'))
         .build();
       var shareDialog = new ShareDialog(new Activity(Ti.Android.currentActivity));
       shareDialog.show(shareContent, ShareDialogMode.AUTOMATIC);
       
  5. Lokesh Choudhary 2017-10-04

    Verified the fix. Used the tests above to verify. Studio Ver: 4.10.0.201709271713 SDK Ver: 6.2.2.GA OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.4 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.14 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Pixel --- Android 7.1.1 Hyperloop: 2.2.0RC2

JSON Source