0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00
Commit Graph

350 Commits

Author SHA1 Message Date
Mani
29fe0055d5
Update JS library (jquery & mathjax) using GitHub action (#11454)
* update js library (jquery & mathjax)
* restore file mode, change paths in conf.js
* use variable for paths and replacement strings
* check if path exists or not for replacement
2022-06-02 18:28:36 -05:00
codingtosh
502ee7a824 Include Edgecases in kotlin migration script + Touch ups
Fix: #11102

Edgecases included:
1. File Renamed instead of deleted+new file
   If the changes made to the file after kotlin conversion
   are not too different, Git's heuristics identifies the
   changelist as a rename directly and "git status" outputs
   "renamed :" instead of "deleted:" + "new file:".
2. Files modified:
   Let the user confirm whether all modified changes are intended.
2022-05-27 10:13:24 +02:00
codingtosh
ef2fa99030 Remove ShellCheck Warnings
Fix: #11100: nit 3

Remove warnings:

1. Double quote to prevent globbing and word splitting.
   see: https://github.com/koalaman/shellcheck/wiki/SC2086
   status: fixed

2. var is referenced but not assigned
   see: https://github.com/koalaman/shellcheck/wiki/SC2154
   status: Suppressed

3. See if you can use ${variable//search/replace} instead.
   see: https://github.com/koalaman/shellcheck/wiki/SC2001
   status: fixed 1 occurrence, suppressed the second
2022-04-27 12:26:00 -05:00
codingtosh
e9cd79f1a3 Reformat with shell script formatter
Fix ankidroid#11100 : nit 3
2022-04-27 12:26:00 -05:00
codingtosh
2b43cd1e96 Fix #11100 : migrate.sh should give changed commit msg
"refactor: Convert fileName to Kotlin"
instead of
"refactor: Convert fileName.kt to Kotlin"
2022-04-26 15:30:07 -05:00
Mike Hardy
b565d5b19c perf(ci, emulator): community emulator action / AVD caching / gradle cachine
Also adds an emulator run benchmarking suite that works in combo with matrix

If branch builds result in cache upload of emulator files the cache files there will
need to be scoped for just changes on the snapshot file(s)
2022-04-24 13:15:19 -05:00
David Allison
253d72d43d kotlin migration: Enable ANDROID_TEST migration
Tested and this works
2022-04-24 09:30:11 -05:00
Arthur Milchior
85f63a5c48
Add a tools/migrate.sh file for Kotlin migration (#10779)
* Add a tools/migrate.sh file for Kotlin migration

Once actual code migration is done, once the code compiles correctly, tests
passes, and before any commit is done, run `tools/migrate.sh`. This will create the
two commits, as we want them in the migration process.

* Fix script for the mac

Signed-off-by: Kshitij Patil <kshitijpatil98@gmail.com>

Co-authored-by: Kshitij Patil <kshitijpatil98@gmail.com>
2022-04-23 16:05:58 -05:00
Mike Hardy
68c6d6ebd4 fix(release): eagerly tag+push version number
This fixes case where a merge happens while release is
happening, this happens a few times a year and requires
a manual fix when it occurs
2022-04-16 18:47:25 -05:00
Brayan Oliveira
44acc13a6f Fix parallel package app name
A comment added to the app_name constant broke its configuration by parallel-package-name.sh

This fixes it by changing the Regex
2022-04-16 13:45:00 +01:00
Mahathi Vempati
2de01c8710
Add warning not to make changes in generated translated files (#10566) 2022-04-07 12:02:57 -05:00
Mike Hardy
458dc53884
chore: rename default branch to main 2022-03-06 14:22:18 -05:00
Mike Hardy
b0c9ba767a
fix(release): continue with release process after google reject
Fixes #9810
2021-11-07 17:22:04 -05:00
Mike Hardy
b8c77b33c9
release: commit/push version / tag immediately after play upload
this shrinks the window where a publish may leave the versioning out of sync
Related #8219 - still a tiny window where a merge within 10mins or so of a publish
may cause problems
2021-10-25 15:24:01 -05:00
David Allison
61b060eabd translations: add 'Sardinian' (ISO 'sc')
Issue 9550
2021-09-24 11:13:02 -05:00
Mike Hardy
c8a1edfb52 fix: do not erase the amp; from &amp;
It seems 6146b1f9e6 is no longer needed

Fixes #9319
Obsoletes #9320
2021-07-28 17:56:14 -05:00
Mike Hardy
4154a37398 fix: use latest command line tools for android linting
This is required for it to work on Java 11, and the old version in use without
this change is obsolete (because it does not work on java11)

Note that GitHub macos-latest - which is used by the workflow that runs this script
as well as normal development environments - has this installed, verified in:
https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#android
(command line tools 4.x is sufficient, it is current "latest" and is installed)
2021-07-28 17:56:14 -05:00
David Allison
9287caecb1 language: Add Kannada
This requires a translation sync to test

Fixes 8979
2021-05-29 03:54:15 +01:00
Mike Hardy
2bcfd2f199 fix(amazon): assemble amazon release w/universal APK, publish correct path
It works!
2021-05-25 18:19:52 -05:00
Mike Hardy
51473903fc Fix language code for Malayalam Language
It needs a regional specificier: ml-IN not ml

hard to know that until you see how it comes down from crowdin...
2021-04-25 13:23:26 -05:00
vinish vishwanath
39b1cc3c60 Added Malayalam Language 2021-04-25 12:40:22 -05:00
Mrudul Tora
6d68424cd4
Fixes #8151 Build flavors for Amazon Appstore and Google Playstore (#8427)
Fixes #8151 Build flavors for Amazon Appstore and Google Playstore
2021-04-19 22:39:06 -05:00
David Allison
98a26cf40f Import 'Odia (India)' language from CrowdIn
01-core hit 100%, so we can import it for testing

This does not enable it in the UI, but allows a language sync and testing

Related: 7850
2020-12-27 19:30:09 -05:00
Arthur Milchior
d2f5db0a10 Still test upload string 2020-08-28 14:34:54 -05:00
Arthur Milchior
372b2b3115 Crowdin: add parameter in -F and not in url
Seems to correspond to the examples of https://support.crowdin.com/api/update-file/
2020-08-28 13:48:10 -05:00
Arthur Milchior
04faa0413f NF: don't translate string 2020-08-28 10:58:33 +02:00
Arthur Milchior
f362e6b2b0 NF: Change of string are not reflected in crowdin
According to https://support.crowdin.com/api/update-file/ , currently, if a string is changed in english, it'll be
marked as needing review everywhere. This is a problem because we either want to add meta-clarification (for translator)
or correct typo. This change ensure that we have the behaviour we want; strings as never seen as changed. If we want to
really change a string, it'll be a new id

This can't be tested until it is actually merged in github.
2020-08-28 10:58:33 +02:00
Mike Hardy
8142207263
Specify path for I18N linter, push after sync 2020-08-23 15:48:07 -05:00
Mike Hardy
ed3d237d42
Port I18N upload to bash, avoid python dependencies 2020-08-23 15:34:42 -05:00
Mike Hardy
1af10d6107
Add workflow to automate crowdin i18n sync 2020-08-23 12:54:40 -05:00
Mike Hardy
d92fdf2a92
GitHub alpha publish - non-zero exit on build fail, +x on utility 2020-08-19 00:26:19 -05:00
Mike Hardy
98f702f0fe
GitHub alpha publish - changelog only important for public release 2020-08-19 00:14:17 -05:00
Mike Hardy
5c51d3b4a0
GitHub alpha publish - install/path for utilities 2020-08-19 00:02:08 -05:00
Mike Hardy
527d35cdb3
Automate alpha publish in github workflow 2020-08-18 23:31:35 -05:00
Mike Hardy
b428d389fe Copy-edit the github release text 2020-07-08 11:23:53 -05:00
Mike Hardy
6e9b923f64
Ignore a specific string in i18n lint check
This was a whole screen full of false positives making
verification that there were no problems quite difficult
2020-06-28 12:46:20 -05:00
Mike Hardy
f7cf613c6e
Use known values for app and id in parallel rename
With the addition of amazon publishing, and another 'applicationId'
in build.gradle, the search for the original app name broke so parallel
rename was not working

There is no need to scan for those values dynamically though, they are fixed
deeply in order to preserve application contintuity on the app stores, so
we can just hard-code them
2020-06-19 17:38:10 -05:00
Mike Hardy
d3a7e94c19
Correct ABIS reference and parallel posting in release script 2020-06-18 12:20:08 -05:00
Mike Hardy
37e5c39476
Use correct github-release arguments
Their README says one thing, code demands another.
I will file an upstream PR
2020-06-18 11:47:48 -05:00
Mike Hardy
0f11c7715e
Upload ABI splits for main APK, with user advice on selection
Fixes #6493
2020-06-18 11:38:52 -05:00
Mike Hardy
598e16e538
Upload universal APK to Amazon for public releases 2020-06-17 16:51:47 -05:00
Mike Hardy
405f2523ec
Invert public / parallel build test for releases
For some reason the 2.12alpha11 build uploaded all parallel builds
but for non-public builds I only want to upload one. Perhaps this will
work
2020-06-17 13:49:44 -05:00
Mike Hardy
3d1d9179ee
Release builds parallel correctly, w/existing passwords 2020-06-15 18:03:16 -05:00
Mike Hardy
f9cf683bae Publish parallel A every release, all parallels on public release
This should help testers that don't want to commit to testing all alphas
This will help release management as parallel releases will be automatic now
2020-06-15 17:12:33 -05:00
Mike Hardy
6c51a9c5f8 Allow universal APK in release, upload it to github
Previous change meant we never had universal APKs but they are useful

This enables them again if you send a command-line toggle in, and then
uses the toggle to upload builds to github
2020-06-15 17:12:33 -05:00
Mike Hardy
bb89029292 Implement ABI splits for release builds
This reduces built APK to 7.5MB vs 10.4MB

Careful consideration was taken to version range space so we won't exhaust it

Manual downloads (github attachments, mostly) are configured as armv7 since no
one uses x86 in real devices anymore - and armv8 devices can run armv7 code
2020-06-14 20:58:13 -05:00
Mike Hardy
143b27c319 Remap Indonesia/Hebrew/Tagalog to three-letter-codes
Fixes #6338 temporarily, @Arthus is potentially going to fix pre-export
via crowdin settings
2020-06-10 18:06:25 -05:00
Mike Hardy
e1cabb4372 Add Santali language 2020-06-09 14:21:20 -05:00
Mike Hardy
a7c44bb041 Improve error attribution in broken I18N finder 2020-06-01 14:00:39 -05:00
Mike Hardy
c507e211ff NF: Improve logging, Improve test, Document I18N variant add 2020-06-01 14:00:39 -05:00
Mike Hardy
79d6e4254e Handle 3-letter language roots correctly
There was an expectation in the importer script that all
language codes had a 2-letter root, but many valid codes that Android
accepts have 3-letter codes *and* collide with the 2-letter codes (fi vs fil)

There was the expectation in the LanguageUtil object that languages
all had 2-letter roots as well, it was altered to split on '-' instead
of on specific character indices, with associated unit testing to verify

Additionally, the 'yu' (Cantonese) custom code needed to map to 'yue'
2020-06-01 14:00:39 -05:00
Mike Hardy
8fb4f6d222
Add note on broken string finder that it is macOS dependent
Not sure exactly why it is mac dependent but it seems to be now,
so I made the one search that was failing not be a hard-fail and
gave it a notice for any developers using it to scan
2020-05-20 11:39:56 -05:00
Mike Hardy
74248a59dc Disable non-functional locale error finding grep
This was working recently, not sure what changed - might just be
an Ubuntu vs macOS difference. Not workin on Ubuntu right now
2020-05-19 09:34:46 -05:00
Mike Hardy
a045fdae74 Add all locales currently targeted by crowdin
Not sure why I didn't notice before but we have a lot more languages
enabled than we were importing and allowing.

No not all of them are translated but they were all user requests, and
if we don't put them in the UI, why would a translator bother?

This was primarily in response to a user request for Sorani (Kurdish),
which is now enabled (locale code ckb)
2020-05-19 09:34:46 -05:00
Mike Hardy
b42bf2bb2c
Remove testing exit from release tool 2020-05-18 10:23:47 -05:00
Mike Hardy
b38e10089e
Note the 30 minute crowdin i18n zip build delay 2020-05-18 10:10:02 -05:00
Mike Hardy
4b088ebd4c Render the official changelog for public releases
This enforces that the public changelog is up to date as it
becomes the source for the changelog shipped with the app

Checks that all the necessary release tools exist and that the changelog
actually contains the information for the current version too

Fixes #6197
2020-05-16 13:01:28 -05:00
Mike Hardy
75df489d1e Call invalid-string finder when we update localizations
Also eliminate a false-positive in the theme file
2020-05-15 15:21:39 -05:00
Mike Hardy
398b832e48 Update broken translation string finder for current code
This still would not have detected #6160 but it will get quite a few
bad translations (it found a couple already, fixed in crowdin for next
download)
2020-05-15 15:21:39 -05:00
Mike Hardy
7ac8ab1beb De-lint and add resilience to APK release tools 2020-05-15 15:21:39 -05:00
Mike Hardy
751c643976 Add missing languages to crowdin manage script 2020-03-30 14:50:49 -05:00
Mike Hardy
ca84b6207d Update localization script with new in-app location of language codes 2020-03-30 14:50:49 -05:00
Mike Hardy
087ae32d55 Add Norwegian Nynorsk and Tatar language codes per user request 2020-03-30 14:50:49 -05:00
Mike Hardy
3dfe576dd1 Alphabetize existing language codes 2020-03-30 14:50:49 -05:00
Mike Hardy
d83a9dc6d3 Optimize CI w/test split; Verify osx/win work 2019-11-04 00:38:02 -05:00
Joshua Ford
5c6d293ebf CI: Use emulator acceleration
To take advantage of some of the new nested virtualization capabilities
of some of the images in Travis, you must be using the newest LTS
release of Ubuntu, 18.04 Bionic Beaver.

However, the Travis image of Bionic does not include support for JDK 8,
which we need to utilize the Android SDK manager. To circumvent this
issue, we change from the "android" language type to "generic", and take
care of both the JDK and the Android SDK ourselves.

As such, this commit makes the following changes:
* Switch `dist` from `trusty` to `bionic`
* Switch `language` from `android` to `generic`
* Enable the use of `sudo`
* Install libpulse0 for emulator audio
* Set up KVM inside the allocated Travis image
* Use Gravis repository to download and install Java
* Version android-wait-for-emulator in our repo
* Download and install the Android SDK ourselves
* Switch to `emulator-headless` for the x86 emulators

Since we're free to switch Java versions as we please, we can finally
support JDK 11 by switching to it after starting our emulator.
2019-11-01 12:01:22 -05:00
Arthur Milchior
9224ff005b Use resources instead of string in standard templates.
In Anki, standard models are localized. More precisely, there are
translations of field names, card name and model names. I ported this
to ankidroid.
2019-10-25 19:19:04 +09:00
Timothy Rae
aa94e209f2 Don't run gitflow-integrate script unless we're on correct branch 2019-10-22 07:11:56 +09:00
Joshua Ford
dfeae3e053 Move Codacy upload into a shell script 2019-06-06 16:17:17 -05:00
Mike Hardy
05bcefdf01 Remove adb restart
It was only needed because I accidentally had multiple adb's on my local system
and they conflicted with one another. In a correctly installed system it is unneeded
2019-02-20 09:45:41 +09:00
Timothy Rae
adf3edeac7 Fix python script shebang 2019-02-17 23:22:55 +09:00
Mike Hardy
597edc2f71 Allow two more parallel build names (5 total now) 2018-12-21 01:10:01 -05:00
Mike Hardy
dd4e7aa52c Emulator tooling to allow for robolectric tests 2018-09-20 23:12:05 +09:00
Mike Hardy
1cf2cbea61 Allow for start to be instantaneous (for manual runs) 2018-09-14 13:31:28 -05:00
Mike Hardy
f00fc2cc20 This file moved to quality sub-dir 2018-09-14 11:55:05 -05:00
Mike Hardy
d3261602c8 Fix parallel release APK location, and tag arg 2018-09-14 11:55:05 -05:00
Mike Hardy
34255cd37e
Add emulator fleet management, local codacy check 2018-09-13 00:46:17 -05:00
Mike Hardy
d8d095b4fa Add local tool for codacy analysis pre-commit 2018-09-10 08:57:05 +09:00
Timothy Rae
db0e1c6983 Update url for crowdin zip file
The old url is failing now, I guess they changed the path
2018-07-29 16:35:04 +09:00
Timothy Rae
6fed42e611 Update manage-crowdin script to python3
pycurl isn't that easy to install for python2 on modern linux systems
2018-07-05 00:18:31 +09:00
Timothy Rae
752e9afb8a Add support for Esperanto 2018-06-26 08:57:28 +09:00
Timothy Rae
01785c2ebf Fix apk location in build script
It's changed in the new gradle
2018-05-11 07:46:39 +09:00
Mike Hardy
063b1de017 in-place sed editing not cross-platform, use perl, fixes #4777 2018-01-29 12:59:14 +09:00
Mike Hardy
e6eb737a40 Add tool to build typical parallel packages
Uses the names used for the previous parallel builds so should
generate 3 new builds that should work as upgrades for the old parallel builds
2017-12-19 12:01:53 +09:00
Mike Hardy
70a8550d8d Alter parallel rename sed to skip backup files
If you use "sed -i -e" it creates backup files with extension '-e' for every edit
This was breaking the build (on MacOS 10.13 + AndroidStudio at least)
I changed it to "-i ''" (zero-length backup extension) so no backup was created
2017-12-19 12:01:53 +09:00
Mike Hardy
4217076d81 updated tool to correctly scrape current format of crowdin.com project translations status 2017-12-15 15:05:58 +09:00
Timothy Rae
d8ba8aacb5 Update gradle-play-publisher 2016-10-23 17:57:36 +09:00
Alexander Grueneberg
30d129c516 Enable fullscreen support. 2015-11-30 12:00:21 -05:00
Alexander Grueneberg
a07da82631 Improve SCRIPT_PATH detection.
Kudos http://stackoverflow.com/a/246128
2015-11-30 12:00:19 -05:00
Alexander Grueneberg
c0c7d400f5 Check for conversion script and apk file separately. 2015-11-30 12:00:17 -05:00
Alexander Grueneberg
95f3b1c7c6 Check if jq exists. 2015-11-30 12:00:09 -05:00
Alexander Grueneberg
3a48cbb295 Remove temporary apk_to_crx output. 2015-11-30 12:00:09 -05:00
Alexander Grueneberg
b55eaa583a apk_to_crx does not support Python 3 anymore. 2015-11-30 12:00:07 -05:00
Alexander Grueneberg
b22a0d6e32 Remove debug scripts in favor of ARC Welder. 2015-11-30 11:59:52 -05:00
Timothy Rae
6e8d0024a1 Add script to update screenshots on Google Play
remove some old files
2015-11-29 23:57:03 +09:00
Timothy Rae
a7cd31ee03 Updated strings from Crowdin 2015-11-27 14:09:23 +09:00
Timothy Rae
f529fbf65d Add parallel install script to release-2.5 branch
@branch-specific
2015-11-19 13:46:51 +09:00
timrae
d3d827927f use the play publishing task in the build script 2015-10-31 12:46:23 +09:00
timrae
9f35b4b4fc Add model manager strings to crowdin script 2015-10-03 03:45:37 +09:00
js
72d200a7d4 Material design version of account setup
Register and login pages placed in scrollviews to accomodate landscape
  and small screens.
Also fixed state transition issues, allowing back/cancel to transition
  rom account setup to login

Not done:
- Dialogs
- home/up button in action bar not implemented
2015-04-12 19:56:05 +09:00