Merge pull request #2355 from crazyserver/MOBILE-3401

Mobile 3401
main
Juan Leyva 2020-04-30 17:30:59 +02:00 committed by GitHub
commit 9e2a942324
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
86 changed files with 662 additions and 330 deletions

View File

@ -1,25 +1,99 @@
os: linux os: linux
dist: bionic dist: bionic
group: edge group: edge
language: node_js language: node_js
node_js: 11 node_js: 11
android:
components:
- tools
- platform-tools
- build-tools-29.0.3
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
git:
depth: 3
before_cache: before_cache:
- rm -rf $HOME/.cache/electron-builder/wine - rm -rf $HOME/.cache/electron-builder/wine
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache: cache:
directories: directories:
- $HOME/.npm - $HOME/.npm
- $HOME/.cache/electron - $HOME/.cache/electron
- $HOME/.cache/electron-builder - $HOME/.cache/electron-builder
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
before_script: before_script:
- npm install npm@latest -g - if [ "$TRAVIS_OS_NAME" != 'windows' ] ; then npm install npm@latest -g ; fi
- gulp - gulp
script: jobs:
- npm run build --bailOnLintError true --typeCheckOnLint true include:
- stage: check
after_success: if: NOT branch =~ /(master$|integration$|desktop)/
- scripts/ci.sh os: linux
script: npm run build --bailOnLintError true --typeCheckOnLint true
- stage: mirror
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp
os: linux
script: scripts/mirror.sh
- stage: prepare
if: branch =~ /(master$|integration)/ AND env(PREPARE) IS present AND env(PREPARE) = 1
os: linux
script: scripts/aot.sh
- stage: build
name: "Build Android"
if: env(DEPLOY) IS present AND (env(DEPLOY) = 1 AND NOT branch = desktop) OR (env(DEPLOY) IN (2,3) AND tag IS present)
os: linux
dist: trusty
group: edge
language: android
before_install:
- nvm install 11
- node --version
- npm --version
- nvm --version
- npm ci
- npm install -g gulp
script: scripts/aot.sh
- stage: build
name: "Build iOS"
if: env(DEPLOY) IS present AND (env(DEPLOY) = 1 AND NOT branch = desktop) OR (env(DEPLOY) IN (2,3) AND tag IS present)
os: osx
osx_image: xcode11.3
script: scripts/aot.sh
- stage: build
name: "Build Linux"
if: env(DEPLOY) IS present AND (env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS present)
os: linux
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
script: scripts/aot.sh
- stage: build
name: "Build MacOS"
if: env(DEPLOY) IS present AND (env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS present)
os: osx
osx_image: xcode11.3
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
script: scripts/aot.sh
- stage: build
name: "Build Windows"
if: env(DEPLOY) IS present AND (env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS present)
os: windows
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
- DEBUG=electron-windows-store
script: scripts/aot.sh

View File

@ -1,202 +1,511 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.moodle.moodlemobile" version="3.8.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.moodle.moodlemobile"
version="3.8.2"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0"
versionCode = "38200"
android-versionCode = "38200"
ios-CFBundleVersion = "3.8.2.0">
<name>Moodle</name> <name>Moodle</name>
<description>Moodle official app</description> <description>Moodle official app</description>
<author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author> <author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author>
<content src="index.html" /> <content src="index.html" />
<access origin="*" /> <access origin="*" />
<access launch-external="yes" origin="tel:*" /> <access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="mailto:*" /> <access launch-external="yes" origin="mailto:*" />
<access launch-external="yes" origin="geo:*" /> <access launch-external="yes" origin="geo:*" />
<allow-navigation href="moodleappfs:*" /> <allow-navigation href="moodleappfs:*" />
<allow-navigation href="cdvfile:*" /> <allow-navigation href="cdvfile:*" />
<allow-navigation href="content:*" /> <allow-navigation href="content:*" />
<allow-navigation href="data:*" /> <allow-navigation href="data:*" />
<allow-navigation href="*" /> <allow-navigation href="*" />
<allow-intent href="*" /> <allow-intent href="*" />
<allow-intent href="tel:*" /> <allow-intent href="tel:*" />
<allow-intent href="sms:*" /> <allow-intent href="sms:*" />
<allow-intent href="mailto:*" /> <allow-intent href="mailto:*" />
<allow-intent href="geo:*" /> <allow-intent href="geo:*" />
<!-- See MOBILE-892 -->
<preference name="permissions" value="none"/>
<preference name="orientation" value="default" /> <preference name="orientation" value="default" />
<preference name="target-device" value="universal" /> <preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" /> <preference name="fullscreen" value="false" />
<preference name="stay-in-webview" value="false" />
<preference name="webviewbounce" value="false" /> <preference name="webviewbounce" value="false" />
<preference name="AppendUserAgent" value="MoodleMobile" />
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="29" />
<preference name="UIWebViewBounce" value="false" /> <preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" /> <preference name="DisallowOverscroll" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="AppendUserAgent" value="MoodleMobile" />
<preference name="BackupWebStorage" value="none" /> <preference name="BackupWebStorage" value="none" />
<preference name="ScrollEnabled" value="false" /> <preference name="ScrollEnabled" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" /> <preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="AllowInlineMediaPlayback" value="true" /> <preference name="AllowInlineMediaPlayback" value="true" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" /> <preference name="LoadUrlTimeoutValue" value="60000" />
<preference name="iosPersistentFileLocation" value="Compatibility" /> <preference name="load-url-timeout" value="60000" />
<preference name="SplashScreen" value="screen" /> <preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="15000" /> <preference name="SplashScreenDelay" value="15000" />
<preference name="SplashMaintainAspectRatio" value="true" /> <preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" /> <preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="LoadUrlTimeoutValue" value="60000" />
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="29" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="CustomURLSchemePluginClearsAndroidIntent" value="true" /> <preference name="CustomURLSchemePluginClearsAndroidIntent" value="true" />
<preference name="iosPersistentFileLocation" value="Compatibility" />
<preference name="Scheme" value="moodleappfs" /> <preference name="Scheme" value="moodleappfs" />
<preference name="iosScheme" value="moodleappfs" /> <preference name="iosScheme" value="moodleappfs" />
<feature name="StatusBar"> <feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" /> <param name="ios-package" onload="true" value="CDVStatusBar" />
</feature> </feature>
<platform name="android"> <platform name="android">
<resource-file src="MainActivity.java" target="app/src/main/java/com/moodle/moodlemobile/MainActivity.java" /> <resource-file src="MainActivity.java" target="app/src/main/java/com/moodle/moodlemobile/MainActivity.java" />
<resource-file src="google-services.json" target="app/google-services.json" /> <resource-file src="google-services.json" target="app/google-services.json" />
<splash density="land-ldpi" qualifier="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" qualifier="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" qualifier="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" qualifier="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" qualifier="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" qualifier="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" qualifier="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" qualifier="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" qualifier="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" qualifier="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" qualifier="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" qualifier="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<resource-file src="resources/android/icon/drawable-ldpi-smallicon.png" target="app/src/main/res/mipmap-ldpi/smallicon.png" /> <resource-file src="resources/android/icon/drawable-ldpi-smallicon.png" target="app/src/main/res/mipmap-ldpi/smallicon.png" />
<resource-file src="resources/android/icon/drawable-mdpi-smallicon.png" target="app/src/main/res/mipmap-mdpi/smallicon.png" /> <resource-file src="resources/android/icon/drawable-mdpi-smallicon.png" target="app/src/main/res/mipmap-mdpi/smallicon.png" />
<resource-file src="resources/android/icon/drawable-hdpi-smallicon.png" target="app/src/main/res/mipmap-hdpi/smallicon.png" /> <resource-file src="resources/android/icon/drawable-hdpi-smallicon.png" target="app/src/main/res/mipmap-hdpi/smallicon.png" />
<resource-file src="resources/android/icon/drawable-xhdpi-smallicon.png" target="app/src/main/res/mipmap-xhdpi/smallicon.png" /> <resource-file src="resources/android/icon/drawable-xhdpi-smallicon.png" target="app/src/main/res/mipmap-xhdpi/smallicon.png" />
<resource-file src="resources/android/splash/drawable-land-hdpi-screen.png" target="app/src/main/res/drawable-land-hdpi/screen.png" /> <!--
<resource-file src="resources/android/splash/drawable-land-ldpi-screen.png" target="app/src/main/res/drawable-land-ldpi/screen.png" /> This should be added by the file-opener2 plugin, but it's not working at the moment. This can be removed
<resource-file src="resources/android/splash/drawable-land-mdpi-screen.png" target="app/src/main/res/drawable-land-mdpi/screen.png" /> once the following issue is resolved and the plugin is updated to include the fix:
<resource-file src="resources/android/splash/drawable-land-xhdpi-screen.png" target="app/src/main/res/drawable-land-xhdpi/screen.png" /> https://github.com/pwlin/cordova-plugin-file-opener2/issues/246
<resource-file src="resources/android/splash/drawable-land-xxhdpi-screen.png" target="app/src/main/res/drawable-land-xxhdpi/screen.png" /> -->
<resource-file src="resources/android/splash/drawable-land-xxxhdpi-screen.png" target="app/src/main/res/drawable-land-xxxhdpi/screen.png" />
<resource-file src="resources/android/splash/drawable-port-hdpi-screen.png" target="app/src/main/res/drawable-port-hdpi/screen.png" />
<resource-file src="resources/android/splash/drawable-port-ldpi-screen.png" target="app/src/main/res/drawable-port-ldpi/screen.png" />
<resource-file src="resources/android/splash/drawable-port-mdpi-screen.png" target="app/src/main/res/drawable-port-mdpi/screen.png" />
<resource-file src="resources/android/splash/drawable-port-xhdpi-screen.png" target="app/src/main/res/drawable-port-xhdpi/screen.png" />
<resource-file src="resources/android/splash/drawable-port-xxhdpi-screen.png" target="app/src/main/res/drawable-port-xxhdpi/screen.png" />
<resource-file src="resources/android/splash/drawable-port-xxxhdpi-screen.png" target="app/src/main/res/drawable-port-xxxhdpi/screen.png" />
<resource-file src="resources/values/colors.xml" target="/app/src/main/res/values/colors.xml" />
<icon background="@color/background" density="ldpi" foreground="resources/android/icon/ldpi-foreground.png" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon background="@color/background" density="mdpi" foreground="resources/android/icon/mdpi-foreground.png" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon background="@color/background" density="hdpi" foreground="resources/android/icon/hdpi-foreground.png" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon background="@color/background" density="xhdpi" foreground="resources/android/icon/xhdpi-foreground.png" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon background="@color/background" density="xxhdpi" foreground="resources/android/icon/xxhdpi-foreground.png" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon background="@color/background" density="xxxhdpi" foreground="resources/android/icon/xxxhdpi-foreground.png" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<config-file parent="/manifest/application" target="AndroidManifest.xml"> <config-file parent="/manifest/application" target="AndroidManifest.xml">
<provider android:authorities="${applicationId}.opener.provider" android:exported="false" android:grantUriPermissions="true" android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider"> <provider android:authorities="${applicationId}.opener.provider" android:exported="false" android:grantUriPermissions="true" android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/opener_paths" /> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/opener_paths" />
</provider> </provider>
</config-file> </config-file>
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>We need your location so you can attach it as part of your submissions.</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
<string>We need your location so you can attach it as part of your submissions.</string>
</edit-config>
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
<icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" />
<icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" />
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" />
<icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" />
<icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" />
<icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" />
<icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" />
<icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" />
<icon height="216" src="resources/ios/icon/icon-108@2x.png" width="216" />
<splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" />
<splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
<splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
</platform>
<plugin name="com-darryncampbell-cordova-plugin-intent" spec="1.3.0" />
<plugin name="cordova-android-support-gradle-release" spec="3.0.1">
<variable name="ANDROID_SUPPORT_VERSION" value="27.1.0" />
</plugin>
<plugin name="cordova-clipboard" spec="1.3.0" />
<plugin name="cordova-plugin-badge" spec="0.8.8" />
<plugin name="cordova-plugin-camera" spec="4.1.0" />
<plugin name="cordova-plugin-customurlscheme" spec="4.4.0">
<variable name="URL_SCHEME" value="moodlemobile" />
</plugin>
<plugin name="cordova-plugin-device" spec="2.0.3" />
<plugin name="cordova-plugin-file" spec="6.0.2" />
<plugin name="cordova-plugin-file-opener2" spec="2.2.1" />
<plugin name="cordova-plugin-file-transfer" spec="1.7.1" />
<plugin name="cordova-plugin-geolocation" spec="4.0.2">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="We need your location so you can attach it as part of your submissions." />
</plugin>
<plugin name="cordova-plugin-globalization" spec="1.11.0" />
<plugin name="cordova-plugin-inappbrowser" spec="3.1.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="2.1.3" />
<plugin name="cordova-plugin-local-notification" spec="https://github.com/moodlemobile/cordova-plugin-local-notification.git#moodle" />
<plugin name="cordova-plugin-media-capture" spec="3.0.3" />
<plugin name="cordova-plugin-network-information" spec="2.0.2" />
<plugin name="cordova-plugin-qrscanner" spec="https://github.com/moodlemobile/cordova-plugin-qrscanner.git#dist" />
<plugin name="cordova-plugin-screen-orientation" spec="3.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.3" />
<plugin name="cordova-plugin-whitelist" spec="1.3.4" />
<plugin name="cordova-plugin-wkwebview-cookies" spec="https://github.com/moodlemobile/cordova-plugin-wkwebview-cookies.git" />
<plugin name="cordova-plugin-zip" spec="3.1.0" />
<plugin name="cordova-sqlite-storage" spec="3.4.0" />
<plugin name="nl.kingsquare.cordova.background-audio" spec="1.0.1" />
<plugin name="phonegap-plugin-push" spec="https://github.com/moodlemobile/phonegap-plugin-push.git#moodle-v3">
<variable name="ANDROID_SUPPORT_V13_VERSION" value="27.+" />
<variable name="FCM_VERSION" value="17.5.+" />
</plugin>
<plugin name="cordova-plugin-ionic-webview" spec="4.1.3" />
<plugin name="cordova-plugin-advanced-http" spec="2.4.1" />
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']"> <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|screenLayout|smallestScreenSize" android:debuggable="true" /> <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|screenLayout|smallestScreenSize" android:debuggable="true" />
</edit-config> </edit-config>
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application"> <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" /> <application android:usesCleartextTraffic="true" />
</edit-config> </edit-config>
<config-file parent="/manifest/application" target="AndroidManifest.xml"> <!-- Make gps location optional, otherwise apps that don't support it won't be able to install the app. -->
<plugin name="cordova-plugin-geolocation" spec="4.0.2">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="We need your location so you can attach it as part of your submissions." />
<edit-config file="AndroidManifest.xml" mode="overwrite" target="/manifest/uses-feature[@android:name='android.hardware.location.gps']">
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
</edit-config>
</plugin>
<!-- Disable firebase analytics. -->
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" /> <meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
</config-file> </config-file>
<config-file parent="FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED" target="*-Info.plist"> </platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>We need your location so you can attach it as part of your submissions.</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
<string>We need your location so you can attach it as part of your submissions.</string>
</edit-config>
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>We need camera access to take pictures so you can attach them as part of your submissions.</string>
</edit-config>
<edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge">
<string>We need microphone access to record sounds so you can attach them as part of your submissions.</string>
</edit-config>
<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>We need photo library access to get pictures from there so you can attach them as part of your submissions.</string>
</edit-config>
<edit-config target="UISupportsDocumentBrowser" file="*-Info.plist" mode="merge">
<true/>
</edit-config>
<edit-config target="CFBundleShortVersionString" file="*-Info.plist" mode="merge">
<string>3.8.2</string>
</edit-config>
<config-file target="*-Info.plist" parent="FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED">
<string>YES</string> <string>YES</string>
</config-file> </config-file>
<engine name="android" spec="8.0.0" /> <config-file target="*-Info.plist" parent="CFBundleDocumentTypes">
<engine name="ios" spec="5.0.1" /> <array>
<dict>
<key>CFBundleTypeName</key>
<string>Unknown File</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.calendar-event</string>
<string>public.database</string>
<string>public.executable</string>
<string>public.data</string>
<string>public.content </string>
<string>public.item</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.video</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.image</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Web Archive</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.webarchive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>iWork Keynote</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.keynote.key</string>
<string>com.apple.iwork.keynote.key</string>
<string>com.apple.iwork.keynote.kth</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>iWork Numbers</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.numbers.numbers</string>
<string>com.apple.iwork.numbers.numbers</string>
<string>com.apple.iwork.numbers.template</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>iWork Pages</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.page.pages</string>
<string>com.apple.iwork.pages.pages</string>
<string>com.apple.iwork.pages.template</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>OpenDocument Spreadsheet</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>org.oasis.opendocument.spreadsheet</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>OpenDocument Presentation</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>org.oasis.opendocument.presentation</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>OpenDocument Text</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>org.oasis.opendocument.text</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Folder</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.folder</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Audio</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.audio</string>
<string>public.mp3</string>
<string>public.mpeg-4-audio</string>
<string>com.apple.protected-mpeg-4-audio</string>
<string>public.aifc-audio</string>
<string>com.apple.coreaudio-format</string>
<string>public.aiff-audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.movie</string>
<string>public.3gpp2</string>
<string>public.3gpp</string>
<string>public.mpeg</string>
<string>com.apple.quicktime-movie</string>
<string>public.mpeg-4</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>GIF image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.compuserve.gif</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>PNG image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.png</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>TIFF image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.tiff</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>JPEG image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.jpeg</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>XML</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.xml</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>HTML</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.html</string>
<string>public.xhtml</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Rich Text</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.rtf</string>
<string>com.apple.rtfd</string>
<string>com.apple.flat-rtfd</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Text</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.text</string>
<string>public.plain-text</string>
<string>public.utf8-plain-text</string>
<string>public.utf16-external-plain-text</string>
<string>public.utf16-plain-text</string>
<string>com.apple.traditional-mac-plain-text</string>
<string>public.source-code</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
<string>public.c-plus-plus-source</string>
<string>public.objective-c-plus-plus-source</string>
<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>com.sun.java-source</string>
<string>public.script</string>
<string>public.shell-script</string>
</array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>zip</string>
<string>zipx</string>
</array>
<key>CFBundleTypeName</key>
<string>Zip archive</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.zip-archive</string>
<string>public.archive</string>
<string>com.pkware.zip-archive</string>
<string>com.pkware.zipx-archive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rar</string>
<string>RAR</string>
</array>
<key>CFBundleTypeName</key>
<string>Rar archive</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.rarlab.rar-archive</string>
<string>public.archive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>7z</string>
<string>7Z</string>
</array>
<key>CFBundleTypeName</key>
<string>7z archive</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>org.7-zip.7-zip-archive</string>
<string>public.archive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Waveform audio</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.microsoft.waveform-audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Windows icon image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.microsoft.ico</string>
<string>com.apple.icns</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Windows bitmap image</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.microsoft.bmp</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Microsoft PowerPoint</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.microsoft.powerpoint.ppt</string>
<string>org.openxmlformats.presentationml.presentation</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Microsoft Excel</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>org.openxmlformats.spreadsheetml.sheet</string>
<string>com.microsoft.excel.xls</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Microsoft Word</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.microsoft.word.doc</string>
<string>com.microsoft.word.wordml</string>
<string>org.openxmlformats.wordprocessingml.document</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>PDF</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
</dict>
</array>
</config-file>
</platform>
</widget> </widget>

View File

@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="Layer_1"
data-name="Layer 1"
viewBox="0 0 1024 1024"
version="1.1"
sodipodi:docname="icon-foreground.svg"
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
inkscape:export-filename="/Users/pau/git/mm3/resources/android/icon-foreground.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<metadata
id="metadata23">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>MoodleApp_Icon_White_RGB</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1306"
inkscape:window-height="970"
id="namedview21"
showgrid="false"
inkscape:zoom="0.11523438"
inkscape:cx="-652.75324"
inkscape:cy="-1188.1419"
inkscape:window-x="1894"
inkscape:window-y="73"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" />
<defs
id="defs4">
<style
id="style2">.cls-1{fill:#fff;}.cls-2,.cls-3,.cls-4{fill:#f48020;}.cls-3,.cls-4{stroke:#4a4a4c;}.cls-3{stroke-width:5.24px;}.cls-4{stroke-width:5.28px;}.cls-5{fill:#333;}</style>
</defs>
<title
id="title6">MoodleApp_Icon_White_RGB</title>
<g
id="g118"
transform="matrix(0.59052793,0,0,0.59052793,211.20967,210.89845)"
style="opacity:1">
<path
transform="translate(-12,-10)"
id="path10"
d="M 714.85,763.42 V 524.26 q 0,-75 -62,-75 -62,0 -62,75 V 763.42 H 469.18 V 524.26 q 0,-75 -60.9,-75 -62,0 -61.95,75 V 763.42 H 224.56 V 510.14 q 0,-78.27 54.35,-118.48 47.85,-35.88 129.37,-35.9 82.64,0 121.77,42.4 33.69,-42.39 122.85,-42.4 81.54,0 129.35,35.9 54.35,40.2 54.35,118.48 v 253.28 z"
class="cls-2"
inkscape:connector-curvature="0"
style="fill:#f48020" />
<path
transform="translate(-12,-10)"
id="path12"
d="M 77.26,402"
class="cls-3"
inkscape:connector-curvature="0"
style="fill:#f48020;stroke:#4a4a4c;stroke-width:5.23999977px" />
<path
transform="translate(-12,-10)"
id="path14"
d="M 79.41,401"
class="cls-4"
inkscape:connector-curvature="0"
style="fill:#f48020;stroke:#4a4a4c;stroke-width:5.28000021px" />
<path
transform="translate(-12,-10)"
id="path16"
d="m 459.3,338 121.9,-88.72 -1.56,-5.4 c -206.31,21.27 -327.1,49 -505.07,154.49 l 1.61,5.27 46.53,-1.49 c 33.56,1.16 68.26,2.79 101.7,2.93 -1.67,18.28 -0.91,39.85 2.6,65.14 v 0 l -0.81,7.1 c 114.91,38.91 224,3.38 281.36,-97.15 l -3.39,-4.62 C 494.8,365.05 475.76,349.59 459.3,338 Z"
class="cls-5"
inkscape:connector-curvature="0"
style="fill:#333333" />
<path
transform="translate(-12,-10)"
id="path18"
d="m 326.35,322.85 c -0.67,-2.38 -4.92,-3.26 -9.48,-2 -3.49,1 -6.17,2.94 -6.95,4.86 -41,11 -108.78,30.36 -156.5,46.43 l -2.94,1 c -36.93,12.42 -54.72,18.79 -55.82,27.76 -5.06,40.82 -1.93,93.35 -1.9,94 l 0.41,14.18 c -21.54,61 0.15,109.76 18.56,154.4 0.12,-55.17 2.36,-100.08 -13.21,-157.18 -0.44,-8.46 -3.31,-67.19 1.33,-104.76 0.76,-6.09 25.79,-14.52 52.3,-23.43 l 2.94,-1 c 48.76,-16.41 118.53,-36.24 159.1,-47.1 a 14.48,14.48 0 0 0 5.08,-0.55 c 4.56,-1.27 7.73,-4.23 7.08,-6.61 z"
class="cls-5"
inkscape:connector-curvature="0"
style="fill:#333333" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1 +0,0 @@
5e8ac0ef8768e0fad3284434d24064f8

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1 +0,0 @@
5225afcaf865b3e218501903bef688e0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1 +0,0 @@
4d2128e5cc9659b321956c1178057980

32
scripts/aot.sh 100755
View File

@ -0,0 +1,32 @@
#!/bin/bash
source "scripts/functions.sh"
if [ ! -z $GIT_ORG_PRIVATE ] && [ ! -z $GIT_TOKEN ] ; then
print_title "Run scripts"
git clone --depth 1 https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/apps-scripts.git ../scripts
cp ../scripts/*.sh scripts/
if [ $TRAVIS_BUILD_STAGE_NAME == 'prepare' ] && [ -f scripts/prepare.sh ] ; then
print_title 'Prepare Build'
./scripts/prepare.sh
if [ $? -ne 0 ]; then
exit 1
fi
elif [ $TRAVIS_BUILD_STAGE_NAME != 'prepare' ] && [ -f scripts/platform.sh ]; then
print_title 'Platform Build'
./scripts/platform.sh
if [ $? -ne 0 ]; then
exit 1
fi
fi
else
print_title "AOT Compilation"
# Dynamic template loading without errors.
sed -ie $'s~throw new Error("No ResourceLoader.*~url = "templates/" + url;\\\nvar resolve;\\\nvar reject;\\\nvar promise = new Promise(function (res, rej) {\\\nresolve = res;\\\nreject = rej;\\\n});\\\nvar xhr = new XMLHttpRequest();\\\nxhr.open("GET", url, true);\\\nxhr.responseType = "text";\\\nxhr.onload = function () {\\\nvar response = xhr.response || xhr.responseText;\\\nvar status = xhr.status === 1223 ? 204 : xhr.status;\\\nif (status === 0) {\\\nstatus = response ? 200 : 0;\\\n}\\\nif (200 <= status \&\& status <= 300) {\\\nresolve(response);\\\n}\\\nelse {\\\nreject("Failed to load " + url);\\\n}\\\n};\\\nxhr.onerror = function () { reject("Failed to load " + url); };\\\nxhr.send();\\\nreturn promise;\\\n~g' node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js
# Do not run JS optimizations to avoid problems with site plugins.
sed -ie "s/context\.isProd || hasArg('--optimizeJs')/false/g" node_modules/@ionic/app-scripts/dist/util/config.js
npm run ionic:build -- --prod
fi

View File

@ -1,81 +0,0 @@
#!/bin/bash
source "scripts/functions.sh"
if [ "$TRAVIS_EVENT_TYPE" == 'cron' ] ; then
# Tests scripts.
print_error 'CRON NOT IMPLEMENTED YET'
else
if [ -z $GIT_ORG_PRIVATE ] || [ -z $GIT_TOKEN ]; then
print_error "Env vars not correctly defined"
exit 1
fi
# List first level of installed libraries so we can check the installed versions.
print_title "NPM packages list"
npm list --depth=0
if [ "$TRAVIS_REPO_SLUG" == 'moodlehq/moodleapp' ]; then
if [ "$TRAVIS_BRANCH" == 'master' ]; then
print_title "Update langpacks"
cd scripts
./update_lang.sh
cd ..
print_title "Update generated lang files"
git remote set-url origin https://$GIT_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
git fetch -q origin
git add -A src/assets/lang
git add */en.json
git add src/config.json
git commit -m 'Update lang files [ci skip]'
print_title "Update Licenses"
npm install -g license-checker
jq --version
license-checker --json --production --relativeLicensePath > licenses.json
jq 'del(.[].path)' licenses.json > licenses_old.json
mv licenses_old.json licenses.json
licenses=`jq -r 'keys[]' licenses.json`
echo "{" > licensesurl.json
first=1
for license in $licenses; do
obj=`jq --arg lic $license '.[$lic]' licenses.json`
licensePath=`echo $obj | jq -r '.licenseFile'`
file=""
if [[ ! -z "$licensePath" ]] || [[ "$licensePath" != "null" ]]; then
file=$(basename $licensePath)
if [ $first -eq 1 ] ; then
first=0
echo "\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
else
echo ",\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
fi
fi
done
echo "}" >> licensesurl.json
jq -s '.[0] * .[1]' licenses.json licensesurl.json > licenses_old.json
mv licenses_old.json licenses.json
rm licensesurl.json
git add licenses.json
git commit -m 'Update licenses [ci skip]'
git push origin HEAD:$TRAVIS_BRANCH
fi
if [ "$TRAVIS_BRANCH" == 'integration' ] || [ "$TRAVIS_BRANCH" == 'master' ] || [ "$TRAVIS_BRANCH" == 'desktop' ] ; then
print_title "Mirror repository"
git remote add mirror https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/moodleapp.git
git fetch -q --unshallow mirror
git push -f mirror HEAD:$TRAVIS_BRANCH
git push mirror --tags
fi
elif [ "$TRAVIS_REPO_SLUG" == "$GIT_ORG_PRIVATE/moodleapp" ]; then
print_title "Run scripts"
git clone --depth 1 https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/apps-scripts.git ../scripts
cp ../scripts/build.sh scripts/
./scripts/build.sh
fi
fi

View File

@ -1,6 +1,16 @@
#!/bin/bash #!/bin/bash
LANGPACKSFOLDER='../../moodle-langpacks' LANGPACKSFOLDER='../../moodle-langpacks'
stepnumber=$1
function check_success_exit {
if [ $? -ne 0 ]; then
print_error "$1"
exit 1
elif [ "$#" -gt 1 ]; then
print_ok "$2"
fi
}
function check_success { function check_success {
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then

89
scripts/mirror.sh 100755
View File

@ -0,0 +1,89 @@
#!/bin/bash
source "scripts/functions.sh"
npm run build --bailOnLintError true --typeCheckOnLint true
if [ -z $GIT_ORG_PRIVATE ] || [ -z $GIT_TOKEN ]; then
print_error "Env vars not correctly defined"
exit 1
fi
# List first level of installed libraries so we can check the installed versions.
print_title "NPM packages list"
npm list --depth=0
if [ "$TRAVIS_BRANCH" == 'master' ]; then
print_title "Update langpacks"
cd scripts
./update_lang.sh
cd ..
print_title "Update generated lang files"
git remote set-url origin https://$GIT_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
git fetch -q origin
git add -A src/assets/lang
git add */en.json
git add src/config.json
git commit -m 'Update lang files [ci skip]'
print_title "Update Licenses"
npm install -g license-checker
jq --version
license-checker --json --production --relativeLicensePath > licenses.json
jq 'del(.[].path)' licenses.json > licenses_old.json
mv licenses_old.json licenses.json
licenses=`jq -r 'keys[]' licenses.json`
echo "{" > licensesurl.json
first=1
for license in $licenses; do
obj=`jq --arg lic $license '.[$lic]' licenses.json`
licensePath=`echo $obj | jq -r '.licenseFile'`
file=""
if [[ ! -z "$licensePath" ]] || [[ "$licensePath" != "null" ]]; then
file=$(basename $licensePath)
if [ $first -eq 1 ] ; then
first=0
echo "\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
else
echo ",\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
fi
fi
done
echo "}" >> licensesurl.json
jq -s '.[0] * .[1]' licenses.json licensesurl.json > licenses_old.json
mv licenses_old.json licenses.json
rm licensesurl.json
git add licenses.json
git commit -m 'Update licenses [ci skip]'
git push origin HEAD:$TRAVIS_BRANCH
fi
VERSION=`jq -r '.versionname' src/config.json`
if [ "$TRAVIS_BRANCH" == 'integration' ] && [ "$VERSION" != *-dev ] ; then
VERSION=$VERSION-dev
jq -r --indent 4 --arg version "$VERSION" -s '.[0] + {versionname: $version}' src/config.json > src/config_new.json
mv src/config_new.json src/config.json
sed -ie "s/version[ ]*=[ ]*\"[0-9\.]*\">/version=\"$VERSION\">/1" config.xml
git remote set-url origin https://$GIT_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
git fetch -q origin
git add src/config.json
git commit -m 'Change config version [ci skip]'
git push origin HEAD:$TRAVIS_BRANCH
fi
if [ "$TRAVIS_BRANCH" == 'integration' ] || [ "$TRAVIS_BRANCH" == 'master' ] || [ "$TRAVIS_BRANCH" == 'desktop' ] ; then
print_title "Mirror repository"
git remote add mirror https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/moodleapp.git
git fetch -q --unshallow mirror
git push -f mirror HEAD:$TRAVIS_BRANCH
git push -f mirror --tags
fi