bitstadium / HockeySDK-Cordova

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.
https://github.com/microsoft/appcenter-sdk-cordova
Other
82 stars 73 forks source link

Android plugin puts library file in the wrong location with cordova-android 7.0.0 #93

Closed bozzaj closed 6 years ago

bozzaj commented 6 years ago

Currently, HockeySDK uses resource-file for the aar file, as such: <resource-file src="src/android/HockeySDK-Android/HockeySDK-5.0.4.aar" target="libs/HockeySDK-5.0.4.aar" />

With Cordova Android 7.0.0, the Cordova team has started placing files in the correct Android Studio locations. This changes the location of resource-file to be in app/src/main, which is typically where Android Studio places resource files.

However, libraries do not go here - they go in app/libs.

An aar file is a library, so probably should be using lib-file, not resource file. Changing the above line to: <lib-file src="src/android/HockeySDK-Android/HockeySDK-5.0.4.aar" />

Allows Cordova Android 7.0.0 to place the file in the correct location. This change also seems to be compatible with previous versions of Cordova Android, but I didn't test all the way back to 4.0.0. However, I did check the github repo, and lib-file is available and places files into libs/ all the way back to the 4.0.0 tag at least.

ElektrojungeAtWork commented 6 years ago

Hey @bozzaj,

thx a lot for reporting this. We're looking into it and will release a new version as soon as we're done testing.

Benjamin