Skip to content

Commit 1c572c5

Browse files
Merge branch 'dev'
2 parents e747b2e + 2d998a7 commit 1c572c5

81 files changed

Lines changed: 4436 additions & 3239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pub" # See documentation for possible values
9+
directory: "/taletime" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build.yaml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,51 @@ jobs:
2121
steps:
2222
- name: ⬇️ Checkout repository
2323
uses: actions/checkout@v3
24+
- name: 📦 Setup Java
25+
uses: actions/setup-java@v2
26+
with:
27+
distribution: 'adopt'
28+
java-version: '17'
2429
- name: ⚙️ Setup Flutter
2530
uses: subosito/flutter-action@v2
2631
with:
2732
channel: 'stable'
2833
cache: true
34+
cache-key: 'flutter-linux'
35+
- name: 💵 Cache flutter build
36+
id: cache-primes
37+
uses: actions/cache@v3
38+
with:
39+
path: |
40+
./taletime/build
41+
/opt/hostedtoolcache/flutter
42+
key: ${{ runner.os }}-flutter-build
2943
- name: 📦 Get dependencies
3044
run: flutter pub get
3145
working-directory: ./taletime
32-
- name: 🔑 Setup signing key
33-
run: |
34-
echo "${{ secrets.SIGNING_KEY_KEYSTORE }}" | base64 -d > taletime/android/app/keystore.jks
3546
- name: 🧪 Run tests
3647
run: flutter test
3748
working-directory: ./taletime
3849
- name: 📱 Build Android
3950
id: build_apk
40-
env:
41-
SIGNING_KEY_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_KEY_PASSWORD }}
42-
SIGNING_KEY_STORE_PASSWORD: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }}
4351
run: |
52+
rm -f build/app/outputs/flutter-apk/*.apk
4453
VERSION=$(grep -oP '^version:\s+\K.+$' pubspec.yaml)
4554
flutter build apk --flavor staging --build-name $VERSION+$GITHUB_RUN_NUMBER
4655
echo "versionName=$VERSION+$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT
47-
cp build/app/outputs/flutter-apk/app-staging-release.apk build/app/outputs/flutter-apk/TaleTime-$VERSION+$GITHUB_RUN_NUMBER.apk
4856
working-directory: ./taletime
57+
- name: 🔑 Sign app
58+
uses: ilharp/sign-android-release@v1
59+
id: sign_app
60+
with:
61+
releaseDir: taletime/build/app/outputs/flutter-apk
62+
signingKey: ${{ secrets.SIGNING_KEY_KEYSTORE }}
63+
keyAlias: "TaleTime-Key"
64+
keyStorePassword: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }}
65+
keyPassword: ${{ secrets.SIGNING_KEY_KEY_PASSWORD }}
66+
buildToolsVersion: 33.0.0
67+
- name: 🏷 Rename APK file
68+
run: cp ${{ steps.sign_app.outputs.signedFile }} taletime/build/app/outputs/flutter-apk/TaleTime-${{ steps.build_apk.outputs.versionName }}.apk
4969
- name: 📦 Upload artifact
5070
uses: actions/upload-artifact@v2
5171
with:

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"name": "taletime",
99
"cwd": "taletime",
1010
"request": "launch",
11-
"type": "dart"
11+
"type": "dart",
12+
"args": ["--flavor", "dev", ]
1213
},
1314
{
1415
"name": "taletime (profile mode)",

taletime/.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ fastlane/readme.md
7777
.pub/
7878
build/
7979
# If you're building an application, you may want to check-in your pubspec.lock
80-
pubspec.lock
8180

8281
# Directory created by dartdoc
8382
# If you don't generate documentation locally you can remove this line.
@@ -242,4 +241,7 @@ GoogleService-Info.plist
242241
google-services.json
243242
# Plugins (already resolved through pubspec.yaml)
244243
.flutter-plugins
245-
.flutter-plugins-dependencies
244+
.flutter-plugins-dependencies
245+
246+
# Untranslated messages land in here
247+
untranslated.txt

taletime/android/app/build.gradle

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
//apply plugin: 'com.google.gms.google-services'
99

10+
plugins {
11+
id "com.android.application"
12+
id "kotlin-android"
13+
id "dev.flutter.flutter-gradle-plugin"
14+
}
15+
1016
def localProperties = new Properties()
1117
def localPropertiesFile = rootProject.file('local.properties')
1218
if (localPropertiesFile.exists()) {
@@ -15,11 +21,6 @@ if (localPropertiesFile.exists()) {
1521
}
1622
}
1723

18-
def flutterRoot = localProperties.getProperty('flutter.sdk')
19-
if (flutterRoot == null) {
20-
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
21-
}
22-
2324
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
2425
if (flutterVersionCode == null) {
2526
flutterVersionCode = '1'
@@ -33,9 +34,6 @@ if (flutterVersionName == null) {
3334

3435

3536

36-
apply plugin: 'com.android.application'
37-
apply plugin: 'kotlin-android'
38-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
3937

4038
android {
4139
compileSdkVersion 33
@@ -70,15 +68,6 @@ android {
7068
}
7169
}
7270

73-
signingConfigs {
74-
release {
75-
storeFile file("./keystore.jks")
76-
storePassword System.getenv("SIGNING_KEY_STORE_PASSWORD")
77-
keyAlias "TaleTime-Key"
78-
keyPassword System.getenv("SIGNING_KEY_KEY_PASSWORD")
79-
}
80-
}
81-
8271
flavorDimensions "environment"
8372

8473
productFlavors {
@@ -94,13 +83,13 @@ android {
9483
dimension "environment"
9584
applicationIdSuffix ".stageing"
9685
resValue "string", "app_name", "[Staging] TaleTime"
97-
signingConfig signingConfigs.release
86+
signingConfig signingConfigs.debug
9887
}
9988

10089
prod {
10190
dimension "environment"
10291
resValue "string", "app_name", "TaleTime"
103-
signingConfig signingConfigs.release
92+
signingConfig signingConfigs.debug
10493
}
10594
}
10695

@@ -112,7 +101,6 @@ flutter {
112101
}
113102

114103
dependencies {
115-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
116104
//implementation platform('com.google.firebase:firebase-bom:30.1.0')
117105
implementation 'com.google.firebase:firebase-analytics'
118106
implementation 'com.android.support:multidex:1.0.3'

taletime/android/app/src/main/AndroidManifest.xml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="de.htwsaar.taletime">
2+
package="de.htwsaar.taletime" xmlns:tools="http://schemas.android.com/tools">
33
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
44
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
5-
<application
5+
<uses-permission android:name="android.permission.WAKE_LOCK"/>
6+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
7+
8+
9+
<application
610
android:label="@string/app_name"
711
android:name="${applicationName}"
812
android:icon="@mipmap/ic_launcher">
913
<activity
10-
android:name=".MainActivity"
14+
android:name="com.ryanheise.audioservice.AudioServiceActivity"
1115
android:enableOnBackInvokedCallback="true"
1216
android:exported="true"
1317
android:launchMode="singleTop"
@@ -33,5 +37,20 @@
3337
<meta-data
3438
android:name="flutterEmbedding"
3539
android:value="2" />
40+
41+
<service android:name="com.ryanheise.audioservice.AudioService"
42+
android:foregroundServiceType="mediaPlayback"
43+
android:exported="true" tools:ignore="Instantiatable">
44+
<intent-filter>
45+
<action android:name="android.media.browse.MediaBrowserService" />
46+
</intent-filter>
47+
</service>
48+
49+
<receiver android:name="com.ryanheise.audioservice.MediaButtonReceiver"
50+
android:exported="true" tools:ignore="Instantiatable">
51+
<intent-filter>
52+
<action android:name="android.intent.action.MEDIA_BUTTON" />
53+
</intent-filter>
54+
</receiver>
3655
</application>
3756
</manifest>

taletime/android/build.gradle

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
buildscript {
2-
ext.kotlin_version = '1.7.10'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.3.0'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()

taletime/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip

taletime/android/settings.gradle

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
210

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
512

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
}
819

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "7.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
24+
}
25+
26+
include ":app"
18.7 KB
Loading

0 commit comments

Comments
 (0)