diff --git a/.env.example b/.env.example index 4bf673e2..3df68e3a 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ ENV = development # Full base URL including protocol (http or https), host and optionally the port and the base api path without trailing forward slash -BASE_API_ENDPOINT_URL = -BASE_STATIC_ENDPOINT_URL = +BASE_API_ENDPOINT_URL = +BASE_STATIC_ENDPOINT_URL = \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a62c966f..6791942f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: - name: Statically analyze the Dart code run: | - echo "" | base64 -d > .env + echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env flutter analyze . test: @@ -96,7 +96,7 @@ jobs: - name: Run tests and generate coverage run: | - echo "" | base64 -d > .env + echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env flutter test --coverage -r expanded . - name: Upload coverage to codecov @@ -107,7 +107,6 @@ jobs: build_android: if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }} - environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }} needs: [analyze, test] runs-on: macos-latest timeout-minutes: 60 @@ -160,9 +159,9 @@ jobs: - name: Build appbundle env: - GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} + GOOGLE_SERVICES_JSON: ${{ github.ref == 'refs/heads/master' && secrets.ANDROID_GOOGLE_SERVICES_JSON || secrets.ANDROID_GOOGLE_SERVICES_JSON_DEV }} run: | - echo ${{ secrets.ENV }} | base64 -d > .env + echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env echo $GOOGLE_SERVICES_JSON | base64 -d > android/app/google-services.json flutter build appbundle --release --build-number $GITHUB_RUN_NUMBER --no-tree-shake-icons cp release_notes.txt build/app/outputs/ @@ -190,7 +189,6 @@ jobs: build_ios: if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }} - environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }} needs: [analyze, test] runs-on: macos-latest timeout-minutes: 60 @@ -267,9 +265,8 @@ jobs: - name: Build iOS app env: - IOS_GOOGLESERVICE_INFO_PLIST: ${{ secrets.IOS_GOOGLESERVICE_INFO_PLIST }} + IOS_GOOGLESERVICE_INFO_PLIST: ${{ github.ref == 'refs/heads/master' && secrets.IOS_GOOGLESERVICE_INFO_PLIST || secrets.IOS_GOOGLESERVICE_INFO_PLIST_DEV }} run: | - echo ${{ secrets.ENV }} | base64 -d > .env echo $IOS_GOOGLESERVICE_INFO_PLIST | base64 --decode > ios/Runner/GoogleService-Info.plist flutter build ipa --release --export-options-plist=ExportOptions.plist --build-number $GITHUB_RUN_NUMBER --no-tree-shake-icons cp release_notes.txt build/ios/ipa/ @@ -327,7 +324,7 @@ jobs: - name: Build web run: | - echo ${{ secrets.ENV }} | base64 -d > .env + echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env flutter build web -t lib/widgetbook/app.widgetbook.dart - name: Publish to Widgetbook @@ -335,7 +332,6 @@ jobs: run: widgetbook publish --api-key $WIDGETBOOK_API_KEY distribute_android: - environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }} needs: [build_android] runs-on: ubuntu-latest steps: @@ -354,7 +350,6 @@ jobs: releaseNotesFile: release_notes.txt distribute_ios: - environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }} needs: [build_ios] runs-on: macos-latest steps: diff --git a/android/app/build.gradle b/android/app/build.gradle index 6216794d..dc27d4f8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -39,7 +39,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "org.collaction.collaction_app" minSdkVersion 21 - targetSdkVersion 31 + targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 73d5e1e6..ff7bab9f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -10,8 +10,7 @@ android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" - android:windowSoftInputMode="adjustResize" - android:exported="true"> + android:windowSoftInputMode="adjustResize">