Skip to content

Commit 6fb7f41

Browse files
committed
WIP: Fix compile and NDK issues
1 parent 53a62c2 commit 6fb7f41

Some content is hidden

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

49 files changed

+669
-290
lines changed

.github/workflows/flutter-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
mkdir android/.keystore
3232
echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > android/.keystore/upload-keystore.jks
3333
echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" | base64 --decode > android/key.properties
34+
flutter doctor --android-licenses
3435
flutter build apk
3536
flutter build appbundle
3637
cp build/app/outputs/flutter-apk/app-release.apk thingset-app_${{github.ref_name}}.apk

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
@@ -27,7 +29,6 @@ migrate_working_dir/
2729
.dart_tool/
2830
.flutter-plugins
2931
.flutter-plugins-dependencies
30-
.packages
3132
.pub-cache/
3233
.pub/
3334
/build/

.metadata

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: d9111f64021372856901a1fd5bfbc386cade3318
8-
channel: stable
7+
revision: "fcf2c11572af6f390246c056bc905eca609533a0"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
17-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
16+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
17+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
1818
- platform: android
19-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
20-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
19+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
20+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
2121
- platform: ios
22-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
23-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
22+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
23+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
2424
- platform: linux
25-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
26-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
25+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
26+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
2727
- platform: macos
28-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
29-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
28+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
29+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
3030
- platform: web
31-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
32-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
31+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
32+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
3333
- platform: windows
34-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
35-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
34+
create_revision: fcf2c11572af6f390246c056bc905eca609533a0
35+
base_revision: fcf2c11572af6f390246c056bc905eca609533a0
3636

3737
# User provided section
3838

analysis_options.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ linter:
1313
# The lint rules applied to this project can be customized in the
1414
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
1515
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at
17-
# https://dart-lang.github.io/linter/lints/index.html.
16+
# and their documentation is published at https://dart.dev/lints.
1817
#
1918
# Instead of disabling a lint rule for the entire project in the
2019
# section below, it can also be suppressed for a single line of code
@@ -23,11 +22,7 @@ linter:
2322
# producing the lint.
2423
rules:
2524
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26-
prefer_single_quotes: true
27-
always_declare_return_types: true
28-
sort_child_properties_last: true
29-
unawaited_futures: true
30-
use_full_hex_values_for_flutter_colors: true
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
3126

3227
# Additional information about this file can be found at
3328
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

android/app/build.gradle

Lines changed: 0 additions & 83 deletions
This file was deleted.

android/app/build.gradle.kts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import java.util.Properties
2+
import java.io.FileInputStream
3+
4+
plugins {
5+
id("com.android.application")
6+
id("kotlin-android")
7+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
8+
id("dev.flutter.flutter-gradle-plugin")
9+
}
10+
11+
val keystoreProperties = Properties()
12+
val keystorePropertiesFile = rootProject.file("key.properties")
13+
if (keystorePropertiesFile.exists()) {
14+
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
15+
}
16+
17+
android {
18+
namespace = "io.thingset.client"
19+
compileSdk = 35
20+
ndkVersion = "29.0.13599879"
21+
22+
compileOptions {
23+
sourceCompatibility = JavaVersion.VERSION_11
24+
targetCompatibility = JavaVersion.VERSION_11
25+
}
26+
27+
kotlinOptions {
28+
jvmTarget = JavaVersion.VERSION_11.toString()
29+
}
30+
31+
defaultConfig {
32+
// Unique Application ID (https://developer.android.com/studio/build/application-id.html).
33+
applicationId = "io.thingset.client"
34+
// You can update the following values to match your application needs.
35+
// For more information, see: https://flutter.dev/to/review-gradle-config.
36+
minSdk = 24
37+
targetSdk = 35
38+
versionCode = flutter.versionCode
39+
versionName = flutter.versionName
40+
}
41+
42+
signingConfigs {
43+
create("release") {
44+
keyAlias = keystoreProperties["keyAlias"] as String
45+
keyPassword = keystoreProperties["keyPassword"] as String
46+
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
47+
storePassword = keystoreProperties["storePassword"] as String
48+
}
49+
}
50+
buildTypes {
51+
release {
52+
// TODO: Add your own signing config for the release build.
53+
// Signing with the debug keys for now, so `flutter run --release` works.
54+
signingConfig = signingConfigs.getByName("debug")
55+
signingConfig = signingConfigs.getByName("release")
56+
}
57+
debug {
58+
applicationIdSuffix = ".debug"
59+
}
60+
}
61+
}
62+
63+
flutter {
64+
source = "../.."
65+
}

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
<application
55
android:label="ThingSet"
66
android:name="${applicationName}"
7-
android:icon="@mipmap/launcher_icon">
7+
android:icon="@mipmap/ic_launcher">
88
<activity
99
android:name=".MainActivity"
1010
android:exported="true"
1111
android:launchMode="singleTop"
12+
android:taskAffinity=""
1213
android:theme="@style/LaunchTheme"
1314
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1415
android:hardwareAccelerated="true"

android/app/src/main/kotlin/com/example/thingset_app/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package io.thingset.client
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity : FlutterActivity()

android/build.gradle

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)