feat: Test with AndroidX support via `cordova-plugin-androidx`
diff --git a/.travis.yml b/.travis.yml
index 5ddd596..f4448e1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -75,6 +75,9 @@
- env: PLATFORM=android-9.0
<<: *_android
+ - env: PLATFORM=android-9.0-androidx
+ <<: *_android
+
before_install:
# manually install Node for `language: android`
- if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi
diff --git a/conf/pr/android-9.0-androidx.config.json b/conf/pr/android-9.0-androidx.config.json
new file mode 100644
index 0000000..7653402
--- /dev/null
+++ b/conf/pr/android-9.0-androidx.config.json
@@ -0,0 +1,10 @@
+{
+ "platform": "android",
+ "action": "run",
+ "cleanUpAfterRun": true,
+ "shouldUseSauce": true,
+ "saucePlatformVersion": "9.0",
+ "sauceDeviceName": "Android GoogleAPI Emulator",
+ "verbose": true,
+ "shouldUseAndroidx": true
+}
diff --git a/lib/ParamedicApp.js b/lib/ParamedicApp.js
index 887bb42..e81cec6 100644
--- a/lib/ParamedicApp.js
+++ b/lib/ParamedicApp.js
@@ -86,6 +86,10 @@
additionalPlugins.push(path.join(__dirname, '..', 'ci-plugin'));
}
+ if (this.config.shouldUseAndroidx()) {
+ additionalPlugins.push('cordova-plugin-androidx');
+ }
+
pluginsManager.installPlugins(additionalPlugins);
}
diff --git a/lib/ParamedicConfig.js b/lib/ParamedicConfig.js
index 474bed8..a211029 100644
--- a/lib/ParamedicConfig.js
+++ b/lib/ParamedicConfig.js
@@ -135,6 +135,14 @@
this._config.shouldUseSauce = sus;
}
+ shouldUseAndroidx () {
+ return this._config.shouldUseAndroidx;
+ }
+
+ setshouldUseAndroidx (value) {
+ this._config.shouldUseAndroidx = value;
+ }
+
getBuildName () {
return this._config.buildName || this.getDefaultBuildName();
}
@@ -309,7 +317,8 @@
ci: argv.ci,
target: argv.target,
fileTransferServer: argv.fileTransferServer,
- cli: argv.cli
+ cli: argv.cli,
+ shouldUseAndroidx: !!argv.shouldUseAndroidx || false
});
};