diff --git a/.gitignore b/.gitignore index 0fa6b67..befe5b6 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release +/android/*.jks +/android/keystore.properties diff --git a/README.md b/README.md index 7d2b63c..00268d0 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,20 @@ A small project to show a not supported anymore splash screen instead of the previous app. and a link to download the next supported version. ## Getting Started - To build this project simply download and install flutter and ```sh $ flutter pub get $ flutter run ``` -If there is a problem whil running `flutter pub get`, make sure you have the right version of flutter and dart by doing `flutter channel stable`, then `flutter upgrade`. \ No newline at end of file +If there is a problem whil running `flutter pub get`, make sure you have the right version of flutter and dart by doing `flutter channel stable`, then `flutter upgrade`. + + +To build this project you need to do: +```sh +$ cd android/ +$ ./scripts/decrypt.sh +# This was needed to decrypt two files: the etsm_upload_ks.jks and the keystore.properties +# It is needed to sign the application with Notre-Dame v3 build +$ cd .. +$ flutter build appbundle +``` \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 1e5ec27..4e01989 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -21,6 +21,10 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +def keystorePropertiesFile = rootProject.file("keystore.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" @@ -33,20 +37,39 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.not_supported_anymore_app" + applicationId "ca.etsmtl.applets.etsmobile.beta" minSdkVersion 16 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } - buildTypes { + signingConfigs { + debug { + keyAlias keystoreProperties['debugKeyAlias'] + keyPassword keystoreProperties['debugKeyPassword'] + storeFile rootProject.file(keystoreProperties['debugKeyStore']) + storePassword keystoreProperties['debugStorePassword'] + } release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. + keyAlias keystoreProperties['releaseKeyAlias'] + keyPassword keystoreProperties['releaseKeyPassword'] + storeFile rootProject.file(keystoreProperties['releaseKeyStore']) + storePassword keystoreProperties['releaseStorePassword'] + } + } + + buildTypes { + debug { + minifyEnabled false signingConfig signingConfigs.debug } + release { + shrinkResources true + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.release + } } } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 0292c90..b254e5a 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="ca.etsmtl.applets.etsmobile.beta"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b70ba5d..3e80efb 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + package="ca.etsmtl.applets.etsmobile.beta"> + android:icon="@mipmap/launcher_icon"> + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png new file mode 100644 index 0000000..cecbc4a Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png new file mode 100644 index 0000000..ddc4add Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png new file mode 100644 index 0000000..3696b2e Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png new file mode 100644 index 0000000..ad5e171 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png new file mode 100644 index 0000000..1d36403 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..d236860 --- /dev/null +++ b/android/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #EF3F45 + \ No newline at end of file diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 0292c90..b254e5a 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="ca.etsmtl.applets.etsmobile.beta"> diff --git a/android/encrypted/etsm_upload_ks.jks.encrypted b/android/encrypted/etsm_upload_ks.jks.encrypted new file mode 100644 index 0000000..1c0bb5e Binary files /dev/null and b/android/encrypted/etsm_upload_ks.jks.encrypted differ diff --git a/android/encrypted/keystore.properties.encrypted b/android/encrypted/keystore.properties.encrypted new file mode 100644 index 0000000..c97b346 --- /dev/null +++ b/android/encrypted/keystore.properties.encrypted @@ -0,0 +1,2 @@ +Salted__zD +|#J!xҫ`PK;r\,KT6j~5.7C%UƘk5`0{HG^smK5'˵9b|\mpp yhIdzKї٘}AAY[2U `+?k`[Z @}kL%OxU5ں_ہuu]l7aEV?<7M+2; \ No newline at end of file diff --git a/android/scripts/decrypt.sh b/android/scripts/decrypt.sh new file mode 100644 index 0000000..e072f99 --- /dev/null +++ b/android/scripts/decrypt.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Deployment script for ÉTSMobile on Android +# Club App|ETS + +# Since Travis-CI deletes the modifications during the build, we need to decrypt the secrets another time +pwd +openssl version -v +openssl aes-256-cbc -k "$ENCRYPTED_ETSMOBILE_KEYSTORE_PW" -in ./encrypted/etsm_upload_ks.jks.encrypted -out ./etsm_upload_ks.jks -d +openssl aes-256-cbc -k "$ENCRYPTED_KEYSTORE_PROPERTIES_PW" -in ./encrypted/keystore.properties.encrypted -out ./keystore.properties -d diff --git a/assets/logos/ic_launcher_foreground.png b/assets/logos/ic_launcher_foreground.png new file mode 100644 index 0000000..a207be4 Binary files /dev/null and b/assets/logos/ic_launcher_foreground.png differ diff --git a/assets/logos/launcher_icon.png b/assets/logos/launcher_icon.png new file mode 100644 index 0000000..7c5e705 Binary files /dev/null and b/assets/logos/launcher_icon.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 67a2768..34ec518 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -285,7 +285,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; @@ -409,7 +409,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; @@ -428,7 +428,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; @@ -468,4 +468,4 @@ /* End XCConfigurationList section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; -} +} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/Contents.json new file mode 100644 index 0000000..80fcaef --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/Contents.json @@ -0,0 +1 @@ +{"images":[{"size":"20x20","idiom":"iphone","filename":"LaunchImage-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"LaunchImage-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"LaunchImage-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"LaunchImage-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"LaunchImage-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"LaunchImage-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"LaunchImage-40x40@3x.png","scale":"3x"},{"size":"60x60","idiom":"iphone","filename":"LaunchImage-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"LaunchImage-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"LaunchImage-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"LaunchImage-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"LaunchImage-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"LaunchImage-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"LaunchImage-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"LaunchImage-40x40@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"LaunchImage-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"LaunchImage-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"LaunchImage-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"LaunchImage-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-1024x1024@1x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-1024x1024@1x.png new file mode 100644 index 0000000..3958883 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@1x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@1x.png new file mode 100644 index 0000000..152ee34 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@2x.png new file mode 100644 index 0000000..bfbf0e7 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@3x.png new file mode 100644 index 0000000..68fc7a6 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@1x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@1x.png new file mode 100644 index 0000000..5f45e14 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@2x.png new file mode 100644 index 0000000..79c422a Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@3x.png new file mode 100644 index 0000000..e405f7c Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@1x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@1x.png new file mode 100644 index 0000000..bfbf0e7 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@2x.png new file mode 100644 index 0000000..e9a93c2 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@3x.png new file mode 100644 index 0000000..30d10bf Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-60x60@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-60x60@2x.png new file mode 100644 index 0000000..30d10bf Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-60x60@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-60x60@3x.png new file mode 100644 index 0000000..acca9e0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-76x76@1x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-76x76@1x.png new file mode 100644 index 0000000..a932058 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-76x76@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-76x76@2x.png new file mode 100644 index 0000000..f8a7f24 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-83.5x83.5@2x.png new file mode 100644 index 0000000..7985101 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.appiconset/LaunchImage-83.5x83.5@2x.png differ diff --git a/pubspec.lock b/pubspec.lock index 88d7d09..d2d4579 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,20 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.6" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" async: dependency: transitive description: @@ -43,6 +57,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" cupertino_icons: dependency: "direct main" description: @@ -62,6 +83,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_launcher_icons: + dependency: "direct dev" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.2" flutter_localizations: dependency: "direct main" description: flutter @@ -77,6 +105,13 @@ packages: description: flutter source: sdk version: "0.0.0" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.8" intl: dependency: "direct main" description: @@ -112,6 +147,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.0" plugin_platform_interface: dependency: transitive description: @@ -222,6 +264,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "5.3.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" sdks: dart: ">=2.14.0 <3.0.0" flutter: ">=2.5.0" diff --git a/pubspec.yaml b/pubspec.yaml index d595dea..0b03636 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: not_supported_anymore_app description: The not supported anymore application. publish_to: "none" -version: 1.0.0+1 +version: 3.1.0-beta+31299 environment: sdk: ">=2.14.0 <3.0.0" @@ -17,6 +17,7 @@ dependencies: url_launcher: ^6.0.12 dev_dependencies: + flutter_launcher_icons: "^0.9.2" flutter_test: sdk: flutter @@ -26,3 +27,10 @@ flutter: assets: - assets/logos/ + +flutter_icons: + android: "launcher_icon" + ios: "LaunchImage" + image_path: "assets/logos/launcher_icon.png" + adaptive_icon_background: "#EF3F45" + adaptive_icon_foreground: "assets/logos/ic_launcher_foreground.png" \ No newline at end of file