Skip to content
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

chore(android): changed minSdkVersion to 21 (Android 5.0) #12316

Merged
merged 15 commits into from Dec 15, 2020

Conversation

jquick-axway
Copy link
Contributor

JIRA:
https://jira.appcelerator.org/browse/TIMOB-28263

Summary:

  • Changed min OS version supported from Android 4.4 to 5.0.
  • Removed backward-compatibility code for OS versions older than 5.0.
  • Note that we get multidexing for free on Android 5.0+. We no longer need Google's library for it.
  • Note that we need to keep the NestedScrollView for CoordinatorLayout support.

Test:

  1. Create a new "Classic" Titanium app from template.
  2. Build for Android.
  3. Go to project folder: ./build/android/app
  4. Open the "build.gradle" file.
  5. Verify minSdkVersion is set to 21.

@build
Copy link
Contributor

build commented Dec 4, 2020

Fails
🚫 Tests have failed, see below for more information.
Warnings
⚠️

tests/Resources/ti.ui.view.test.js#L7 - tests/Resources/ti.ui.view.test.js line 7 – 'OS_ANDROID' is defined but never used. (no-unused-vars)

Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 9 tests have failed There are 9 tests failing and 915 skipped out of 16181 total tests.

Tests:

ClassnameNameTimeError
android.emulator.Titanium.Androidactivity callbacks (5.0.2)5.067
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53120)
android.emulator.Titanium.UI.Android.ProgressIndicatordialog indeterminant - show in different windows (5.0.2)5.123
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.ListViewListView header & footer (5.0.2)0.871
Error: expected 'Ti.UI.View' to match image ('snapshots/listView_header_footer_540x960@2x.png')
    mismatched pixels
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value [as matchImage] (/node_modules/should/cjs/should.js:356:9)
      at Context.<anonymous> (/ti.ui.listview.test.js:1376:14)
      at Test.Runnable.run (/ti-mocha.js:6535:54163)
      at Runner.runTest (/ti-mocha.js:6535:58604)
      at /ti-mocha.js:6535:59445
      at next (/ti-mocha.js:6535:58013)
      at /ti-mocha.js:6535:57975
      at next (/ti-mocha.js:6535:57665)
      at /ti-mocha.js:6535:57759
android.emulator.Titanium.UI.NavigationWindowbasic open/close navigation (5.0.2)10.078
Error: timeout of 10000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.TableViewTableView + TableViewSection headerView & footerView (5.0.2)0.482
Error: expected 'Ti.UI.View' to match image ('snapshots/tableView_tableViewSection_header_footer_540x960@2x.png')
    mismatched pixels
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value [as matchImage] (/node_modules/should/cjs/should.js:356:9)
      at Context.<anonymous> (/ti.ui.tableview.test.js:1766:14)
      at Test.Runnable.run (/ti-mocha.js:6535:54163)
      at Runner.runTest (/ti-mocha.js:6535:58604)
      at /ti-mocha.js:6535:59445
      at next (/ti-mocha.js:6535:58013)
      at /ti-mocha.js:6535:57975
      at next (/ti-mocha.js:6535:57665)
      at /ti-mocha.js:6535:57759
android.emulator.Titanium.UI.TableViewTableView headerView & footerView (5.0.2)0.438
Error: expected 'Ti.UI.View' to match image ('snapshots/tableView_header_footer_540x960@2x.png')
    mismatched pixels
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value [as matchImage] (/node_modules/should/cjs/should.js:356:9)
      at Context.<anonymous> (/ti.ui.tableview.test.js:1727:14)
      at Test.Runnable.run (/ti-mocha.js:6535:54163)
      at Runner.runTest (/ti-mocha.js:6535:58604)
      at /ti-mocha.js:6535:59445
      at next (/ti-mocha.js:6535:58013)
      at /ti-mocha.js:6535:57975
      at next (/ti-mocha.js:6535:57665)
      at /ti-mocha.js:6535:57759
android.emulator.Titanium.UI.View"after all" hook (5.0.2)22.773
Error: timeout of 10000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.View"after each" hook (5.0.2)12.77
Error: timeout of 10000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.WebViewuserAgent (5.0.2)43.926
Error: invalid userAgent
at WebView.<anonymous> (/ti.ui.webview.test.js:329:8)
      at WebView.value (ti:/events.js:50:21)
      at WebView.value (ti:/events.js:102:19)

Generated by 🚫 dangerJS against b8c2cdd

@sgtcoolguy
Copy link
Contributor

Note that w/ appcelerator/chef-jenkins-node#8, we will now have an android-21-x86 emulator on the build nodes. We may want to consider adding in this PR forking the android tests to run on both android-30-playstore-x86 and android-21-x86 emulators in parallel for PRs?

@jquick-axway
Copy link
Contributor Author

jquick-axway commented Dec 5, 2020

@sgtcoolguy , I modified the "Jenkins" file to also test on Android 5.0. What do you think?
Jenkinsfile

By the way, our Android 5.0 emulator does not have enough storage space to install the APK. In my opinion, main storage should be at least 3-4 GB (I set mine to 4 GB). The emulator's default storage setting is never enough.

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

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

CR: PASS

Just waiting on Jenkins emulator space issues to be resolved.

Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

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

FR Passed MinSDK version now shows 21 instead of 19 when following the test steps mentioned in the PR description.

Test Environment

MacOS Big Sur: 11.1 Beta 1
Xcode: 12.2 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
N3xus 5X API 29 (emulator) 

@sgtcoolguy sgtcoolguy merged commit aa9c9b4 into tidev:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants