Skip to content

Commit 994cb7f

Browse files
committed
Update flutter
1 parent 87fb589 commit 994cb7f

File tree

10 files changed

+225
-226
lines changed

10 files changed

+225
-226
lines changed

.github/workflows/ubuntu.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,30 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9+
- uses: actions/checkout@v4
910
- uses: actions/setup-java@v2
1011
with:
1112
distribution: "zulu"
12-
java-version: "17"
13+
java-version: "21"
14+
cache: "gradle"
1315
- uses: subosito/flutter-action@v2
1416
with:
1517
channel: stable
16-
flutter-version: 3.19.5
17-
- uses: actions-rs/toolchain@v1
18+
flutter-version: 3.29.1
19+
cache: true
20+
- uses: dtolnay/rust-toolchain@master
1821
with:
1922
toolchain: nightly
20-
- uses: actions/checkout@v4
23+
targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android
2124
- name: Setup Rust tools for Android build
2225
run: |
23-
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
2426
cargo install cargo-ndk
2527
- name: Setup Keystore
2628
run: |
2729
echo $ANDROID_KEYSTORE | base64 --decode > ./android/app/key.jks
2830
echo $ANDROID_KEY_PROPERTIES | base64 --decode > ./android/key.properties
31+
ls -l .
32+
tree
2933
- name: Build for Android
3034
env:
3135
SDK_REGISTRY_TOKEN: ${{ secrets.MAP_SDK_SECRET_KEY }}

android/app/build.gradle

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def keystorePropertiesFile = rootProject.file("key.properties")
28
def keystoreProperties = new Properties()
39
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
@@ -10,11 +16,6 @@ if (localPropertiesFile.exists()) {
1016
}
1117
}
1218

13-
def flutterRoot = localProperties.getProperty('flutter.sdk')
14-
if (flutterRoot == null) {
15-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
16-
}
17-
1819
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1920
if (flutterVersionCode == null) {
2021
flutterVersionCode = '1'
@@ -25,17 +26,8 @@ if (flutterVersionName == null) {
2526
flutterVersionName = '1.0'
2627
}
2728

28-
apply plugin: 'com.android.application'
29-
apply plugin: 'kotlin-android'
30-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
31-
3229
android {
33-
compileSdkVersion 34
34-
35-
compileOptions {
36-
sourceCompatibility JavaVersion.VERSION_1_8
37-
targetCompatibility JavaVersion.VERSION_1_8
38-
}
30+
compileSdkVersion 35
3931

4032
kotlinOptions {
4133
jvmTarget = '1.8'
@@ -74,10 +66,6 @@ flutter {
7466
source '../..'
7567
}
7668

77-
dependencies {
78-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
79-
}
80-
8169
[
8270
Debug: null,
8371
Profile: '--release',

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="de.seemoo.android.openhaystack">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
43
<uses-permission android:name="android.permission.INTERNET"/>
54
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

android/build.gradle

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

218
rootProject.buildDir = '../build'
229
subprojects {
10+
afterEvaluate { project ->
11+
if (project.hasProperty('android')) {
12+
project.android {
13+
if (namespace == null) {
14+
namespace project.group
15+
}
16+
}
17+
}
18+
}
2319
project.buildDir = "${rootProject.buildDir}/${project.name}"
2420
project.evaluationDependsOn(':app')
2521
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Fri Apr 28 22:51:27 BRT 2023
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

android/settings.gradle

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
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+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

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

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"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "8.2.1" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.20" apply false
23+
}
24+
25+
include ":app"

lib/accessory/accessory_detail.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class _AccessoryDetailState extends State<AccessoryDetail> {
144144
style: ButtonStyle(
145145
backgroundColor: MaterialStateProperty.resolveWith<Color?>(
146146
(Set<MaterialState> states) {
147-
return Theme.of(context).errorColor;
147+
return Theme.of(context).colorScheme.error;
148148
},
149149
),
150150
),

lib/item_management/item_file_import.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class _ItemFileImportState extends State<ItemFileImport> {
175175
children: [
176176
Text(
177177
'An error occured.',
178-
style: Theme.of(context).textTheme.headline5,
178+
style: Theme.of(context).textTheme.titleLarge,
179179
),
180180
Padding(
181181
padding: const EdgeInsets.only(top: 8.0),

0 commit comments

Comments
 (0)