Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for 1.14.0 #540

Merged
merged 53 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
fe55039
Gulpfile updates
eb1 Dec 1, 2023
2cee13d
Update main.yml
eb1 Dec 1, 2023
6bcde4f
test cordova.clean
eb1 Dec 1, 2023
52050dd
Remove prep-xx from gulp workflow
eb1 Dec 2, 2023
250bc33
CI build stuff
eb1 Dec 4, 2023
a4a6c48
Update main.yml
eb1 Dec 4, 2023
44248af
Update gulpfile.js
eb1 Dec 4, 2023
1ac5b7b
Update main.yml
eb1 Dec 4, 2023
30f4724
Update main.yml
eb1 Dec 5, 2023
2df62cf
Update main.yml
eb1 Dec 5, 2023
55481a8
Update main.yml
eb1 Dec 5, 2023
f50f8bd
Update main.yml
eb1 Dec 5, 2023
afd1667
Remove splashscreen plugin
eb1 Dec 5, 2023
648cbab
Merge branch 'master' of https://github.com/eb1/adapt-it-mobile
eb1 Dec 5, 2023
5b76045
Update main.yml
eb1 Dec 5, 2023
327746a
Update main.yml
eb1 Dec 5, 2023
f64bef3
Update main.yml
eb1 Dec 5, 2023
c802a0f
Update main.yml
eb1 Dec 5, 2023
4f45d65
Update main.yml
eb1 Dec 5, 2023
6204620
Update main.yml
eb1 Dec 5, 2023
d3c8fb1
Update main.yml
eb1 Dec 5, 2023
ad5c0b4
Update main.yml
eb1 Dec 5, 2023
e41519f
Update main.yml
eb1 Dec 5, 2023
ea17883
Update main.yml
eb1 Dec 5, 2023
c572fd0
Update main.yml
eb1 Dec 5, 2023
3f80474
Update main.yml
eb1 Dec 5, 2023
8263a75
Update main.yml
eb1 Dec 5, 2023
4646adc
Update main.yml
eb1 Dec 5, 2023
a2d2075
Update main.yml
eb1 Dec 5, 2023
40d4aac
Update main.yml
eb1 Dec 5, 2023
7964c18
Update main.yml
eb1 Dec 5, 2023
05acc32
Update main.yml
eb1 Dec 5, 2023
9bb7132
Update main.yml
eb1 Dec 6, 2023
3ff5b1c
Bump version
eb1 Dec 15, 2023
5d05564
Fix #538
eb1 Dec 20, 2023
40972a9
Follow-up on #538
eb1 Dec 20, 2023
b08c46c
Work on #539
eb1 Dec 21, 2023
e1e806d
Work on #539
eb1 Dec 22, 2023
2a2f6b8
Work on #539
eb1 Dec 23, 2023
20ffca7
Add SQLite / ES6 promise plugin collision gotcha
eb1 Dec 27, 2023
f41ef19
Work on #539
eb1 Dec 27, 2023
e3e1de7
Work on #539
eb1 Dec 28, 2023
e074adf
Update backbone and handlebars versions
eb1 Dec 29, 2023
bae8063
Work on #539
eb1 Dec 29, 2023
ca373cb
Work on #539
eb1 Dec 30, 2023
9629c16
Work on #539
eb1 Jan 3, 2024
3f28638
Work on #539
eb1 Jan 3, 2024
c40c9c0
Work on #539
eb1 Jan 3, 2024
c1a3442
Work on #539
eb1 Jan 3, 2024
4e864e5
Work on #539
eb1 Jan 3, 2024
5aca5be
Work on #539
eb1 Jan 4, 2024
130587b
Fix #539
eb1 Jan 4, 2024
eeb98f2
Merge branch 'master' into master
eb1 Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions
# Workflow for Android CI

name: CI Debug Build
name: CI Android Debug Build

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
Expand All @@ -20,19 +20,31 @@ jobs:
# fs-extra dependency requires node v10+
strategy:
matrix:
node-version: [16.x]

node-version: [20.x]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: npm install
- run: npm install -g gulp
- run: npm link gulp
- run: gulp --debug
- name: Prep Build
run: |
npm install
npm install -g gulp
npm install -g cordova
npm link gulp
gulp prep-android-dir
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.6
- name: Dbg cordova build
run: cordova prepare android --verbose

env:
CI: true
69 changes: 49 additions & 20 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="47" defaultlocale="en" id="org.adaptit.adaptitmobile" ios-CFBundleVersion="1" version="1.13.1" 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" xmlns:gap="http://phonegap.com/ns/1.0">
<widget android-versionCode="48" defaultlocale="en" id="org.adaptit.adaptitmobile" ios-CFBundleVersion="1" version="1.14.0" 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" xmlns:gap="http://phonegap.com/ns/1.0">
<name short="Adapt It Mobile" xml:lang="en">Adapt It Mobile</name>
<description xml:lang="en">
An open source application for translating between related languages.
Expand All @@ -18,21 +18,25 @@
<preference name="SplashMaintainAspectRatio" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<!-- IMPORTANT NOTE: sqlite plugin seems to collide with the ES6 promise plugin, currently a dependency of the plain-vanilla
social sharing plugin (basically, SQLite doesn't launch and the app doesn't start). As of 12/27/2023, we're using a fork
of the social sharing plugin from https://github.com/IsraelHikingMap/corodova-plugin-socialsharing-android12 -->
<platform name="android">
<plugin name="cordova-sqlite-evcore-extbuild-free" spec="^0.15.1" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<!-- SDK 26/Android 8.x: currently 5% marketshare as of 2023;
Using this as lowest SDK because it supports adaptive icons (for splash / app icon) -->
<!-- SDK 26/Android 8.x: lowest SDK that supports adaptive icons (for splash / app icon) -->
<preference name="android-minSdkVersion" value="26" />
<preference name="android-targetSdkVersion" value="33" />
<!-- static splash resources no longer used -->
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="www/res/svg/ic_aim_adaptive_splash.xml" />
<preference name="AndroidWindowSplashScreenIconBackgroundColor" value="#279ED8" />
<preference name="CustomURLSchemePluginClearsAndroidIntent" value="true" />
<preference name="AndroidXEnabled" value="true" />
<preference name="AndroidLaunchMode" value="singleTask" />
<preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,root" />
<preference name="AndroidPersistentFileLocation" value="Internal" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:largeHeap="true" />
</edit-config>
<config-file mode="replace" parent="/manifest" target="AndroidManifest.xml">
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
Expand All @@ -54,32 +58,36 @@
<data android:scheme="content" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<!-- our mimeType is really broad; limit to our 6 supported filetypes
<!-- our mimeType is really broad; limit to our 7 supported filetypes
(and work around Android's ugly path pattern matching system) -->
<data android:pathPattern=".*\\.xml" />
<data android:pathPattern=".*\\.tmx" />
<data android:pathPattern=".*\\.txt" />
<data android:pathPattern=".*\\.usfm" />
<data android:pathPattern=".*\\.sfm" />
<data android:pathPattern=".*\\.usx" />
<data android:pathPattern=".*\\.aic" />
<data android:pathPattern=".*\\..*\\.xml" />
<data android:pathPattern=".*\\..*\\.tmx" />
<data android:pathPattern=".*\\..*\\.txt" />
<data android:pathPattern=".*\\..*\\.usfm" />
<data android:pathPattern=".*\\..*\\.sfm" />
<data android:pathPattern=".*\\..*\\.usx" />
<data android:pathPattern=".*\\..*\\.aic" />
<data android:pathPattern=".*\\..*\\..*\\.xml" />
<data android:pathPattern=".*\\..*\\..*\\.tmx" />
<data android:pathPattern=".*\\..*\\..*\\.txt" />
<data android:pathPattern=".*\\..*\\..*\\.usfm" />
<data android:pathPattern=".*\\..*\\..*\\.sfm" />
<data android:pathPattern=".*\\..*\\..*\\.usx" />
<data android:pathPattern=".*\\..*\\..*\\.aic" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.xml" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.tmx" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.txt" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.usfm" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.sfm" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.usx" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.aic" />
</intent-filter>
</config-file>
<icon density="ldpi" src="www/res/icon/android/ldpi.png" />
Expand Down Expand Up @@ -153,6 +161,20 @@
<string>public.xml</string>
</array>
</dict>
<dict>
<key>CFBundleTypeIconFiles</key>
<array />
<key>CFBundleTypeName</key>
<string>Adapt It Configuration Document</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>org.adapt-it.document.aic</string>
</array>
</dict>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
Expand Down Expand Up @@ -233,6 +255,27 @@
<string>text/*</string>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.text</string>
</array>
<key>UTTypeDescription</key>
<string>Adapt It Configuration Document</string>
<key>CFBundleTypeIconFiles</key>
<array />
<key>UTTypeIdentifier</key>
<string>org.adapt-it.document.aic</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>aic</string>
</array>
<key>public.mime-type</key>
<string>text/*</string>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
Expand Down Expand Up @@ -321,21 +364,7 @@
<preference name="www/res/icon/electron/icon.png" />
<preference name="www/res/icon/electron/[email protected]" target="installer" />
</platform>
<platform name="windows">
<plugin name="cordova-sqlite-evcore-extbuild-free" spec="^0.15.1" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<preference name="WindowsStoreDisplayName" value="Adapt It Mobile" />
<preference name="StatusBarOverlaysWebView" value="true" />
<icon src="www/res/icon/windows/storelogo.png" target="StoreLogo" />
<icon src="www/res/icon/windows/Square30x30Logo.png" target="Square30x30Logo" />
<icon src="www/res/icon/windows/Square44x44Logo.png" target="Square44x44Logo" />
<icon src="www/res/icon/windows/Square70x70Logo.png" target="Square70x70Logo" />
<icon src="www/res/icon/windows/Square71x71Logo.png" target="Square71x71Logo" />
<icon src="www/res/icon/windows/Square150x150Logo.png" target="Square150x150Logo" />
<icon src="www/res/icon/windows/Square310x310Logo.png" target="Square310x310Logo" />
<icon src="www/res/icon/windows/Wide310x150Logo.png" target="Wide310x150Logo" />
<splash src="www/res/screen/windows/splashscreen.png" target="SplashScreen" />
</platform>
<plugin name="cordova-plugin-chooser" spec="^1.3.1" />
<plugin name="cordova-plugin-fonts" spec="^0.6.5" />
<plugin name="cordova-plugin-filepath" spec="https://github.com/VIAVI-Solutions/cordova-plugin-filepath.git" />
<plugin name="cordova-plugin-keyboard" spec="https://github.com/sinn1/cordova-plugin-keyboard.git" />
Expand Down
38 changes: 36 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
// Gulpfile for Adapt It Mobile builds
var gulp = require("gulp"),
fs = require("fs"),
cp = require('child_process'),
cordova = require("cordova-lib").cordova;

// prep the Android platform -- either add it or clean it
gulp.task("prep-android-dir", function (done) {
var path = "./platforms/android";
if (!fs.existsSync(path)) {
process.stdout.write('Android dir not detected -- creating platform android\n');
var cmd = cp.spawn('cordova', ["platform", "add", "android"], {stdio: 'inherit'}).on('exit', done);
} else {
process.stdout.write('cleaning platform android\n');
var cmd = cp.spawn('cordova', ["clean", "android"], {stdio: 'inherit'}).on('exit', done);
}
});

// build Android
gulp.task("build-android", function (done) {
cordova.build({
"platforms": ["android"],
Expand All @@ -11,6 +26,21 @@ gulp.task("build-android", function (done) {
}, done());
});

// prep the iOS platform -- either add it or clean it
gulp.task("prep-ios-dir", function (done) {
var path = "./platforms/ios";
if (!fs.existsSync(path)) {
process.stdout.write('ios dir not detected -- creating platform ios\n');
var cmd = cp.spawn('cordova', ["platform", "add", "ios@latest"], {stdio: 'inherit'}).on('exit', done);
} else {
process.stdout.write('cleaning platform ios\n');
var cmd = cp.spawn('cordova', ["clean", "ios"], {stdio: 'inherit'}).on('exit', done);
// cordova.clean("ios", {argv: "--verbose"});
// done();
}
});

// build iOS
gulp.task("build-ios", function (done) {
cordova.build({
"platforms": ["ios"],
Expand All @@ -20,10 +50,14 @@ gulp.task("build-ios", function (done) {
}, done());
});

// prep both Android and iOS
gulp.task("prep", gulp.parallel("prep-android-dir", "prep-ios-dir"));

// build both Android and iOS
gulp.task("build", gulp.parallel("build-android", "build-ios"));

gulp.task("default", gulp.series("build"), function () {
// default (gulp) - just build Android for the CI build
gulp.task("default", gulp.series("build-android"), function () {
// Copy results to bin folder
gulp.src("platforms/android/app/build/output/apk/release/*.apk").pipe(gulp.dest("bin/release/android")); // Gradle build
gulp.src("platforms/ios/build/device/*.ipa").pipe(gulp.dest("bin/release/ios"));
});
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"cordova-android": "^12.0.1",
"cordova-clipboard": "github:ihadeed/cordova-clipboard",
"cordova-ios": "^7.0.1",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-chooser": "^1.3.2",
"cordova-plugin-customurlscheme": "^5.0.2",
"cordova-plugin-device": "github:apache/cordova-plugin-device",
"cordova-plugin-dialogs": "^2.0.2",
Expand All @@ -39,7 +41,6 @@
"dependencies": {
"cordova-lib": "^10.1.0",
"cordova-plugin-fonts": "^0.6.5",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-statusbar": "^2.4.3",
"crypto-randomuuid": "^1.0.0",
"electron-builder": "^23.0.3",
Expand Down Expand Up @@ -89,11 +90,12 @@
"cordova-sqlite-evcore-extbuild-free": {},
"cordova-plugin-file": {
"ANDROIDX_WEBKIT_VERSION": "1.4.0"
}
},
"cordova-plugin-chooser": {}
},
"platforms": [
"ios",
"android"
"android",
"ios"
]
}
}
}
5 changes: 3 additions & 2 deletions www/js/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ define(function (require) {
searchIndex: 0,
currentProject: null,
localURLs: [],
version: "1.13.1", // appended with Android / iOS build info
AndroidBuild: "47", // (was milestone release #)
version: "1.14.0", // appended with Android / iOS build info
AndroidBuild: "48", // (was milestone release #)
iOSBuild: "1", // iOS uploaded build number for this release (increments from 1 for each release)
importingURL: "", // for other apps in Android-land sending us files to import

Expand Down Expand Up @@ -537,6 +537,7 @@ define(function (require) {
// update the book and chapter lists, then show the import docs view
$.when(window.Application.BookList.fetch({reset: true, data: {name: ""}})).done(function () {
$.when(window.Application.ChapterList.fetch({reset: true, data: {name: ""}})).done(function () {
var proj = window.Application.currentProject;
if (proj !== null) {
importDocView = new DocumentViews.ImportDocumentView({model: proj});
importDocView.isLoadingFromURL = false;
Expand Down
6 changes: 3 additions & 3 deletions www/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
require.config({

// 3rd party lib versions:
// backbone 1.4.0
// backbone 1.5.0
// backbone.babysitter 0.1.12
// backbone.wreqr 1.4.0
// circular-progress-bar 1.0.6
// fastclick 1.0.6
// featherlight 1.7.6
// featherlight.gallery 1.7.6
// hammer 2.0.8
// handlebars 4.7.7
// handlebars 4.7.8
// hopscotch 0.3.1+ ** NOTE: if upgrading, fold in the hack in hopscotch.js (search for EDB HACK) -
// ** This is for hopscotch on smaller screens, issue #30 on hopscotch, or #189 on AIM
// i18next 1.9.0
Expand All @@ -34,7 +34,7 @@ require.config({
// libraries
'backbone': 'backbone-min',
'hammerjs': 'hammer',
'handlebars': 'handlebars.min-v4.7.7',
'handlebars': 'handlebars.min-v4.7.8',
'jquery-hammerjs': 'jquery.hammer',
typeahead: 'typeahead.bundle',
'i18n': 'i18next.amd.withJQuery.min', //'jquery-i18next.min',//
Expand Down
Loading
Loading