Skip to content

abi split test #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions data/issues/nativescript-cli-abi-split/app.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Add your native dependencies here:

// Uncomment to add recyclerview-v7 dependency
//dependencies {
// compile 'com.android.support:recyclerview-v7:+'
//}

android {
defaultConfig {
generatedDensities = []
applicationId = "org.nativescript.TestApp"

//override supported platforms
// ndk {
// abiFilters.clear()
// abiFilters "armeabi-v7a"
// }
ndk {
abiFilters.clear()
}
splits {
abi {
enable true //enables the ABIs split mechanism
reset() //reset the list of ABIs to be included to an empty string
include 'arm64-v8a', 'armeabi-v7a', 'x86'
universalApk true
}
}

}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
19 changes: 19 additions & 0 deletions tests/build/android/build_android_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ def test_202_build_android_with_log_trace_and_platform_not_added_or_empty(self):
assert "[DEBUG]" in output
assert "FAILURE" not in output

def test_205_build_android_abi_split(self):
#https://github.com/NativeScript/nativescript-cli-tests/issues/119
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}, assert_success=False)
copy = os.path.join(TEST_RUN_HOME, 'data', 'issues', 'nativescript-cli-abi-split', 'app.gradle')
paste = os.path.join(self.app_name, 'app', 'App_Resources', 'Android')
Folder.copy(copy, paste)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On windows Folder.copy() in this case rises WindowsError: Not a directory, when you try to copy app.gradle. If you use the File.copy method everything is fine.

Tns.platform_add_android(attributes={"--path": self.app_name, "--frameworkPath": ANDROID_PACKAGE})
Tns.run_tns_command("build android", attributes={"--path": self.app_name})
assert File.exists(self.app_name +
"/platforms/android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk")
assert File.exists(self.app_name +
"/platforms/android/app/build/outputs/apk/debug/app-armeabi-v7a-debug.apk")
assert File.exists(self.app_name +
"/platforms/android/app/build/outputs/apk/debug/app-universal-debug.apk")
assert File.exists(self.app_name +
"/platforms/android/app/build/outputs/apk/debug/app-x86-debug.apk")
assert File.exists(self.app_name +
"/platforms/android/app/build/outputs/apk/debug/output.json")

@unittest.skipIf(CURRENT_OS != OSType.OSX, "Run only on macOS.")
def test_300_build_project_with_dash_and_ios_inspector_added(self):
"""
Expand Down