From 54d9ae11ac455924c4ad5a50cfea732bdf891aeb Mon Sep 17 00:00:00 2001 From: Khalil Gharbaoui Date: Sat, 19 Sep 2020 04:49:44 +0200 Subject: [PATCH 1/2] Allow app.api_version overwrite by environment var --- lib/android.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/android.rb b/lib/android.rb index 180c3df..dbeb00f 100644 --- a/lib/android.rb +++ b/lib/android.rb @@ -5,7 +5,7 @@ require 'motion-gradle' Motion::Project::App.setup do |app| - app.api_version = '23' unless Motion::Project::Config.starter? + app.api_version = ENV['ANDROID_APP_API_VERSION'] ||= '23' unless Motion::Project::Config.starter? app.build_dir = 'build/android' app.assets_dirs << 'resources' app.resources_dirs = [] From f84bb207770bb4271107bb53ae9075290914b5c6 Mon Sep 17 00:00:00 2001 From: Khalil Gharbaoui Date: Sat, 19 Sep 2020 06:07:05 +0200 Subject: [PATCH 2/2] Add note about ANDROID_APP_API_VERSION to readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 20913fc..9d09ec4 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,13 @@ If you are targeting Android, you need to install the dependencies with Gradle: $ bundle && rake android:gradle:install ``` +NOTE: The Android app API version defaults to version `"23"`. +To overwrite it set the environment variable `ANDROID_APP_API_VERSION` to the desired version for example: + +``` +echo 'export ANDROID_APP_API_VERSION="28"' >> ~/.zshrc +``` + ### Projects #### Flow projects