Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainDario committed Jan 21, 2024
2 parents 0e42fba + 430bc5f commit 5df50de
Show file tree
Hide file tree
Showing 15 changed files with 183 additions and 17 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/all_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,47 @@ jobs:
KEY_PROPERTIES_STORE_PASSWORD: ${{ secrets.KEY_PROPERTIES_STORE_PASSWORD }}
KEY_PROPERTIES_KEY_ALIAS: ${{ secrets.KEY_PROPERTIES_KEY_ALIAS }}
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

#ios-test-and-build:
# needs:
# - cache_assets
# uses: ./.github/workflows/ios_test_and_build.yml
#secrets:
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
# POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
# POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

linux-test-and-build:
needs:
- cache_assets
uses: ./.github/workflows/linux_test_and_build.yml
secrets:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

#macos-test-and-build:
# needs:
# - cache_assets
# uses: ./.github/workflows/macos_test_and_build.yml
# secrets:
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
# POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
# POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

windows-test-and-build:
needs:
- cache_assets
uses: ./.github/workflows/windows_test_and_build.yml
secrets:
SELF_SIGN_MSIX_PFX: ${{secrets.SELF_SIGN_MSIX_PFX}}
SELF_SIGN_MSIX_PWD: ${{secrets.SELF_SIGN_MSIX_PWD}}
uses: ./.github/workflows/windows_test_and_build.yml
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}


create_github_release:
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/all_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,45 @@ jobs:
KEY_PROPERTIES_STORE_PASSWORD: ${{ secrets.KEY_PROPERTIES_STORE_PASSWORD }}
KEY_PROPERTIES_KEY_ALIAS: ${{ secrets.KEY_PROPERTIES_KEY_ALIAS }}
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

#ios-test-and-build:
# needs:
# - cache_assets
# uses: ./.github/workflows/ios_test_and_build.yml
#secrets:
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
# POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
# POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

linux-test-and-build:
needs:
- cache_assets
uses: ./.github/workflows/linux_test_and_build.yml
secrets:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

#macos-test-and-build:
# needs:
# - cache_assets
# uses: ./.github/workflows/macos_test_and_build.yml
# secrets:
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
# POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
# POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

windows-test-and-build:
needs:
- cache_assets
uses: ./.github/workflows/windows_test_and_build.yml
secrets:
SELF_SIGN_MSIX_PFX: ${{secrets.SELF_SIGN_MSIX_PFX}}
SELF_SIGN_MSIX_PWD: ${{secrets.SELF_SIGN_MSIX_PWD}}
uses: ./.github/workflows/windows_test_and_build.yml
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}

3 changes: 0 additions & 3 deletions .github/workflows/android_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ jobs:
gh release upload gh_action artifacts/DaKanji_${{env.DAKANJI_VERSION}}_x86_64.apk --clobber
gh release upload gh_action artifacts/DaKanji_${{env.DAKANJI_VERSION}}_fat.apk --clobber
# TODO upload flatpak to GH release


# get appbundle artifact and upload it to GH release and play store
- name: get build artifacts for appbundle
uses: actions/download-artifact@v3
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/android_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ on:
required: true
KEYSTORE_BASE64:
required: true
SENTRY_DSN:
required: true
POSTHOG_API_KEY_DEV:
required: true
POSTHOG_API_KEY_REL:
required: true


env:
Expand Down Expand Up @@ -84,7 +90,8 @@ jobs:
- name: Setup DaKanji env.dart
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
run: |
python3 ./.github/workflows/create_dakanji_env.py
flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/create_dakanji_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
with open("dakanji.env", mode="w+") as f:

f.write(f"SENTRY_DSN={os.environ['SENTRY_DSN']}\n")
f.write(f"POSTHOG_API_KEY_REL={os.environ['POSTHOG_API_KEY']}\n")
f.write(f"POSTHOG_API_KEY_REL={os.environ['POSTHOG_API_KEY_REL']}\n")
f.write(f"POSTHOG_API_KEY_DEV={os.environ['POSTHOG_API_KEY_DEV']}\n")

14 changes: 10 additions & 4 deletions .github/workflows/ios_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ on:

# allows that other workflows can run this one
workflow_call:
#secrets:
# DA_KANJI_ML_RELEASES_TOKEN:
# required: true
secrets:
SENTRY_DSN:
required: true
POSTHOG_API_KEY_DEV:
required: true
POSTHOG_API_KEY_REL:
required: true


env:
FLUTTER_VERSION: "2.10.3"
Expand Down Expand Up @@ -70,7 +75,8 @@ jobs:
- name: Setup DaKanji env.dart
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
run: |
python3 ./.github/workflows/create_dakanji_env.py
flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/linux_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ on:

# allows that other workflows can run this one
workflow_call:
#secrets:
secrets:
SENTRY_DSN:
required: true
POSTHOG_API_KEY_DEV:
required: true
POSTHOG_API_KEY_REL:
required: true

#env:

Expand Down Expand Up @@ -66,7 +72,8 @@ jobs:
- name: Setup DaKanji env.dart
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
run: |
python3 ./.github/workflows/create_dakanji_env.py
flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/macos_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ on:

# allows that other workflows can run this one
workflow_call:
#secrets:
secrets:
SENTRY_DSN:
required: true
POSTHOG_API_KEY_DEV:
required: true
POSTHOG_API_KEY_REL:
required: true

#env:

Expand Down Expand Up @@ -72,7 +78,8 @@ jobs:
- name: Setup DaKanji env.dart
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
run: |
python3 ./.github/workflows/create_dakanji_env.py
flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/windows_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ on:
required: true
SELF_SIGN_MSIX_PWD:
required: true
SENTRY_DSN:
required: true
POSTHOG_API_KEY_DEV:
required: true
POSTHOG_API_KEY_REL:
required: true

#env:

Expand Down Expand Up @@ -71,7 +77,8 @@ jobs:
- name: Setup DaKanji env.dart
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_KEY_REL: ${{ secrets.POSTHOG_API_KEY_REL }}
POSTHOG_API_KEY_DEV: ${{ secrets.POSTHOG_API_KEY_DEV }}
run: |
python3 ./.github/workflows/create_dakanji_env.py
flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ assets/ipadic.zip
# ignore custom tf lite flutter repo
# plugins/tflite_flutter_plugin/
./plugins/kagome_dart/*
macos/libtensorflowlite_c-mac.dylib

# ignore all keys in keys folder
keys/DaKanjiRecognizer.jks
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@

# DaKanji - changelog

## v3.3.3 - 仮名 (21.12.2023)

New Features:

- Kana chart
- Includes all common (and not-so-common) kana
- Mnemonics for the main kana
- Sounds for all available kana

Improvements:

- Better organized settings
- Some fresh paint with Material 3 and Flutter 3.16
- New dictionary data
- Examples 50% smaller

Fixed:

- Various UI fixes
- Text screen selection buttons when no text is selected / available
- DoJG asking twice to import

-------------------------------------------------------------------------

## v3.3.2 - 仮名 (19.12.2023)

New Features:

- Kana chart
- Includes all common (and not-so-common) kana
- Mnemonics for the main kana
- Sounds for all available kana

Improvements:

- Better organized settings
- Some fresh paint with Material 3 and Flutter 3.16
- New dictionary data
- Examples 50% smaller

Fixed:

- Various UI fixes
- Text screen selection buttons when no text is selected / available
- DoJG asking twice to import

-------------------------------------------------------------------------

## v3.3.1 - 仮名 (14.12.2023)

New Features:
Expand Down
2 changes: 2 additions & 0 deletions flatpak/com.DaAppLab.DaKanji.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
</screenshot>
</screenshots>
<releases>
<release version="3.3.3" date="2024-01-21" />
<release version="3.3.2" date="2024-01-19" />
<release version="3.3.1" date="2024-01-14" />
<release version="3.2.0" date="2023-12-8" />
</releases>
Expand Down
2 changes: 2 additions & 0 deletions lib/repositories/analytics/event_logging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:math';
import 'package:da_kanji_mobile/env.dart';
import 'package:da_kanji_mobile/globals.dart';
import 'package:da_kanji_mobile/repositories/releases/installation_method.dart';
import 'package:da_kanji_mobile/repositories/releases/os_info.dart';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
Expand Down Expand Up @@ -59,6 +60,7 @@ Future<Map> defaultProperties() async {
return {
"Installation method" : await findInstallationMethod(),
"Platform" : Platform.operatingSystem,
"Platform version" : await getVersion(),
"Version" : g_Version.fullVersionString,
"Debug" : kDebugMode,
"distinct_id": "Anonym_${randomId()}"
Expand Down
40 changes: 40 additions & 0 deletions lib/repositories/releases/os_info.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import 'dart:io';

import 'package:device_info_plus/device_info_plus.dart';



Future<String> getVersion() async {

String version;

final info = DeviceInfoPlugin();

if(Platform.isAndroid){
final androidInfo = (await info.androidInfo);
version = androidInfo.version.release;
}
else if(Platform.isIOS){
final iosInfo = (await info.iosInfo);
version = iosInfo.systemVersion;
}
else if(Platform.isMacOS){
final macosInfo = (await info.macOsInfo);
version = macosInfo.osRelease;
}
else if(Platform.isLinux){
final linuxInfo = (await info.linuxInfo);
version = "${linuxInfo.name} ${linuxInfo.version}";
}
else if(Platform.isWindows){
final windowsInfo = (await info.windowsInfo);
version = windowsInfo.productName;
}
else{
version = "unknown";
}


return version;

}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ funding:

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 3.3.1+81
version: 3.3.3+92


environment:
Expand Down

0 comments on commit 5df50de

Please sign in to comment.