Skip to content

Commit 072428b

Browse files
authored
Merge pull request #1136 from cph-cachet/apk-package-upgrade
APK package upgrade
2 parents c1207b5 + d0d5948 commit 072428b

File tree

22 files changed

+254
-259
lines changed

22 files changed

+254
-259
lines changed
Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,84 @@
1+
## 1.1.1
2+
3+
* upgrade to Android APK
4+
15
## 1.0.0
26

3-
- first stable release
4-
- update to Bluetooth permissions in demo app
5-
- improved handling of disconnection
7+
* first stable release
8+
* update to Bluetooth permissions in demo app
9+
* improved handling of disconnection
610

711
## 0.7.0
812

9-
- Upgrade of Kotlin and AGP
10-
- Dart fix
13+
* Upgrade of Kotlin and AGP
14+
* Dart fix
1115

1216
## 0.6.2
1317

14-
- Added podspec file to iOS
18+
* Added podspec file to iOS
1519

1620
## 0.6.1
1721

18-
- fixed bug in sampling rate configuration on Android
19-
- small improvement to API doc and example app
22+
* fixed bug in sampling rate configuration on Android
23+
* small improvement to API doc and example app
2024

2125
## 0.6.0
2226

23-
- moved permission handling to app level
24-
- improved on iOS implementation
25-
- improvement to example app
26-
- improvement to README
27+
* moved permission handling to app level
28+
* improved on iOS implementation
29+
* improvement to example app
30+
* improvement to README
2731

2832
## 0.5.0
2933

30-
- upgrade to Android embedding v2
34+
* upgrade to Android embedding v2
3135

3236
## 0.4.3
3337

34-
- fix of error in setSamplingRate method on iOS
38+
* fix of error in setSamplingRate method on iOS
3539

3640
## 0.4.0
3741

38-
- upgrade to null-safety
42+
* upgrade to null-safety
3943

4044
## 0.3.0
4145

42-
- singleton changed to recommended dart style using `ESenseManager()`.
43-
- fixed bug in reconnection.
44-
- updated the Android app to [post 1.12 Android project](https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects).
45-
- small improvement to the demo app (now supports connection via a button).
46+
* singleton changed to recommended dart style using `ESenseManager()`.
47+
* fixed bug in reconnection.
48+
* updated the Android app to [post 1.12 Android project](https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects).
49+
* small improvement to the demo app (now supports connection via a button).
4650

4751
## 0.2.1
4852

49-
- updated Swift implementation to version 5
53+
* updated Swift implementation to version 5
5054

5155
## 0.2.0+2
5256

53-
- update to readme on iOS
54-
- added bluetooth permission to `Info.plist`
57+
* update to readme on iOS
58+
* added bluetooth permission to `Info.plist`
5559

5660
## 0.2.0+1
5761

58-
- small update to documentation
62+
* small update to documentation
5963

6064
## 0.2.0
6165

62-
- support for iOS implemented
63-
- improved example app
64-
- improvement to documentation
66+
* support for iOS implemented
67+
* improved example app
68+
* improvement to documentation
6569

6670
## 0.1.3
6771

68-
- sampling rate can be set before connecting to device.
72+
* sampling rate can be set before connecting to device.
6973

7074
## 0.1.2
7175

72-
- small improvement to the example app (still not very good though...)
76+
* small improvement to the example app (still not very good though...)
7377

7478
## 0.1.1+1
7579

76-
- update of readme documentation on API.
80+
* update of readme documentation on API.
7781

7882
## 0.1.0
7983

80-
- Initial release supporting 1st released version of the Android eSense library, dated April 2019.
84+
* Initial release supporting 1st released version of the Android eSense library, dated April 2019.
Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,68 @@
1-
group 'dk.cachet.esense_flutter'
2-
version '1.0'
1+
group = "k.cachet.esense_flutter"
2+
version = "1.0-SNAPSHOT"
33

44
buildscript {
5+
ext.kotlin_version = "1.8.22"
56
repositories {
67
google()
78
mavenCentral()
89
}
910

1011
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.1.0'
12+
classpath("com.android.tools.build:gradle:8.1.0")
13+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
1214
}
1315
}
1416

15-
rootProject.allprojects {
17+
allprojects {
1618
repositories {
1719
google()
1820
mavenCentral()
1921
}
2022
}
2123

22-
apply plugin: 'com.android.library'
24+
apply plugin: "com.android.library"
25+
apply plugin: "kotlin-android"
2326

2427
android {
25-
compileSdkVersion 31
28+
namespace "dk.cachet.esense_flutter"
29+
30+
compileSdk = 31
2631

2732
compileOptions {
28-
sourceCompatibility JavaVersion.VERSION_1_8
29-
targetCompatibility JavaVersion.VERSION_1_8
33+
sourceCompatibility = JavaVersion.VERSION_11
34+
targetCompatibility = JavaVersion.VERSION_11
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = JavaVersion.VERSION_11
39+
}
40+
41+
sourceSets {
42+
main.java.srcDirs += "src/main/kotlin"
43+
test.java.srcDirs += "src/test/kotlin"
3044
}
3145

3246
defaultConfig {
33-
minSdkVersion 16
47+
minSdk = 21
48+
}
49+
50+
dependencies {
51+
testImplementation("org.jetbrains.kotlin:kotlin-test")
52+
testImplementation("org.mockito:mockito-core:5.0.0")
53+
}
54+
55+
testOptions {
56+
unitTests.all {
57+
useJUnitPlatform()
58+
59+
testLogging {
60+
events "passed", "skipped", "failed", "standardOut", "standardError"
61+
outputs.upToDateWhen {false}
62+
showStandardStreams = true
63+
}
64+
}
3465
}
35-
namespace "dk.cachet.esense_flutter"
3666
}
67+
68+
Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,45 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
126
}
137

14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
22-
}
23-
24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
288
android {
29-
compileSdkVersion flutter.compileSdkVersion
9+
namespace = "dk.cachet.esense_flutter_example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
3012

3113
compileOptions {
32-
sourceCompatibility JavaVersion.VERSION_1_8
33-
targetCompatibility JavaVersion.VERSION_1_8
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
3420
}
3521

3622
defaultConfig {
3723
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3824
applicationId "dk.cachet.esense_flutter_example"
39-
minSdkVersion flutter.minSdkVersion
40-
targetSdkVersion flutter.targetSdkVersion
41-
versionCode flutterVersionCode.toInteger()
42-
versionName flutterVersionName
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4331
}
4432

4533
buildTypes {
4634
release {
4735
// TODO: Add your own signing config for the release build.
4836
// Signing with the debug keys for now, so `flutter run --release` works.
49-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
5038
}
5139
}
5240
}
5341

5442
flutter {
55-
source '../..'
43+
source = "../.."
5644
}
45+

packages/esense_flutter/example/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="dk.cachet.esense_flutter_example"
32
xmlns:tools="http://schemas.android.com/tools">
43

54
<!-- The following permission is related to the eSense library -->
@@ -51,4 +50,15 @@
5150
android:name="flutterEmbedding"
5251
android:value="2" />
5352
</application>
53+
<!-- Required to query activities that can process text, see:
54+
https://developer.android.com/training/package-visibility and
55+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
56+
57+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
58+
<queries>
59+
<intent>
60+
<action android:name="android.intent.action.PROCESS_TEXT"/>
61+
<data android:mimeType="text/plain"/>
62+
</intent>
63+
</queries>
5464
</manifest>

packages/esense_flutter/example/android/build.gradle

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
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()
174
mavenCentral()
185
}
196
}
207

21-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
229
subprojects {
2310
project.buildDir = "${rootProject.buildDir}/${project.name}"
2411
}
2512
subprojects {
26-
project.evaluationDependsOn(':app')
13+
project.evaluationDependsOn(":app")
2714
}
2815

2916
tasks.register("clean", Delete) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
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.1.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
23+
}
24+
25+
include ":app"

packages/esense_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: esense_flutter
22
description: The eSense Flutter Plugin supporting the eSense earable computing devices from Nokia Bell Labs, Cambridge.
3-
version: 1.0.0
3+
version: 1.1.1
44
homepage: https://github.com/cph-cachet/flutter-plugins/tree/master/packages/esense_flutter
55

66
environment:

0 commit comments

Comments
 (0)