Skip to content

Commit 331e2f9

Browse files
committed
publish screen_state 4.1.0 upgrade of APK
1 parent aa583ed commit 331e2f9

13 files changed

Lines changed: 117 additions & 158 deletions

File tree

packages/screen_state/CHANGELOG.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
1+
## 4.1.0
2+
3+
* upgrade of Android APK
4+
* adding linter
5+
* removing `ScreenStateException` and instead returning an empty stream on unsupported platforms for more graceful handling
6+
17
## 4.0.0
28

3-
- Added support for iOS.
4-
- Restructuring of the interaction between the plugin and native applications.
9+
* Added support for iOS.
10+
* Restructuring of the interaction between the plugin and native applications.
511

612
## 3.0.1
713

8-
- Reduced minSdk version to 23
14+
* Reduced minSdk version to 23
915

1016
## 3.0.0
1117

12-
- `Screen()` implemented as singleton.
13-
- Updates Kotlin plugin and AGP.
14-
- Upgrade of `compileSdkVersion` to 33.
15-
- Upgrade to Dart 3.
18+
* `Screen()` implemented as singleton.
19+
* Updates Kotlin plugin and AGP.
20+
* Upgrade of `compileSdkVersion` to 33.
21+
* Upgrade to Dart 3.
1622

1723
## 2.0.0
1824

19-
- Null safety migration
25+
* Null safety migration
2026

2127
## 1.0.1
2228

23-
- Fixed an issue causing the plugin to crash when the stream was cancelled and then opened again.
24-
- See <https://github.com/cph-cachet/flutter-plugins/issues/188>
29+
* Fixed an issue causing the plugin to crash when the stream was cancelled and then opened again.
30+
* See <https://github.com/cph-cachet/flutter-plugins/issues/188>
2531

2632
## 1.0.0
2733

28-
- Migrated to new Android Plugin API (Flutter 1.12)
34+
* Migrated to new Android Plugin API (Flutter 1.12)
2935

3036
## 0.5.0
3137

32-
- Migrated to AndroidX
38+
* Migrated to AndroidX

packages/screen_state/example/analysis_options.yaml renamed to packages/screen_state/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ linter:
2121
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
2222
# producing the lint.
2323
rules:
24-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
24+
avoid_print: false # Uncomment to disable the `avoid_print` rule
2525
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
2626

2727
# Additional information about this file can be found at
Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,68 @@
1-
group 'dk.cachet.screen_state'
2-
version '1.0-SNAPSHOT'
1+
group = "dk.cachet.screen_state"
2+
version = "1.0-SNAPSHOT"
33

44
buildscript {
5-
ext.kotlin_version = '1.7.20'
5+
ext.kotlin_version = "1.8.22"
66
repositories {
77
google()
8-
jcenter()
8+
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.3.0'
13-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12+
classpath("com.android.tools.build:gradle:8.1.0")
13+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
1414
}
1515
}
1616

17-
rootProject.allprojects {
17+
allprojects {
1818
repositories {
1919
google()
20-
jcenter()
20+
mavenCentral()
2121
}
2222
}
2323

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

2727
android {
28-
compileSdkVersion 33
28+
namespace "dk.cachet.screen_state"
29+
30+
compileSdk = 35
31+
32+
compileOptions {
33+
sourceCompatibility = JavaVersion.VERSION_11
34+
targetCompatibility = JavaVersion.VERSION_11
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = JavaVersion.VERSION_11
39+
}
2940

3041
sourceSets {
31-
main.java.srcDirs += 'src/main/kotlin'
42+
main.java.srcDirs += "src/main/kotlin"
43+
test.java.srcDirs += "src/test/kotlin"
3244
}
45+
3346
defaultConfig {
34-
minSdkVersion 23
47+
minSdk = 21
3548
}
36-
lintOptions {
37-
disable 'InvalidPackage'
49+
50+
dependencies {
51+
testImplementation("org.jetbrains.kotlin:kotlin-test")
52+
testImplementation("org.mockito:mockito-core:5.0.0")
3853
}
39-
namespace "dk.cachet.screen_state"
40-
}
4154

42-
dependencies {
43-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
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+
}
65+
}
4466
}
67+
68+

packages/screen_state/android/gradle.properties

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

packages/screen_state/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,44 @@
11
plugins {
22
id "com.android.application"
33
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
45
id "dev.flutter.flutter-gradle-plugin"
56
}
67

7-
def localProperties = new Properties()
8-
def localPropertiesFile = rootProject.file('local.properties')
9-
if (localPropertiesFile.exists()) {
10-
localPropertiesFile.withReader('UTF-8') { reader ->
11-
localProperties.load(reader)
12-
}
13-
}
14-
15-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16-
if (flutterVersionCode == null) {
17-
flutterVersionCode = '1'
18-
}
19-
20-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21-
if (flutterVersionName == null) {
22-
flutterVersionName = '1.0'
23-
}
24-
258
android {
26-
namespace "com.example.example"
27-
compileSdkVersion flutter.compileSdkVersion
28-
ndkVersion flutter.ndkVersion
9+
namespace = "com.example.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
2912

3013
compileOptions {
31-
sourceCompatibility JavaVersion.VERSION_1_8
32-
targetCompatibility JavaVersion.VERSION_1_8
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
3316
}
3417

3518
kotlinOptions {
36-
jvmTarget = '1.8'
37-
}
38-
39-
sourceSets {
40-
main.java.srcDirs += 'src/main/kotlin'
19+
jvmTarget = JavaVersion.VERSION_1_8
4120
}
4221

4322
defaultConfig {
4423
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45-
applicationId "com.example.example"
24+
applicationId = "com.example.example"
4625
// You can update the following values to match your application needs.
47-
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48-
minSdkVersion 23
49-
targetSdkVersion flutter.targetSdkVersion
50-
versionCode flutterVersionCode.toInteger()
51-
versionName flutterVersionName
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
5231
}
5332

5433
buildTypes {
5534
release {
5635
// TODO: Add your own signing config for the release build.
5736
// Signing with the debug keys for now, so `flutter run --release` works.
58-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
5938
}
6039
}
6140
}
6241

6342
flutter {
64-
source '../..'
43+
source = "../.."
6544
}
66-
67-
dependencies {}

packages/screen_state/example/android/build.gradle

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
1-
buildscript {
2-
ext.kotlin_version = '1.7.10'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10-
}
11-
}
12-
131
allprojects {
142
repositories {
153
google()
164
mavenCentral()
175
}
186
}
197

20-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
219
subprojects {
2210
project.buildDir = "${rootProject.buildDir}/${project.name}"
2311
}
2412
subprojects {
25-
project.evaluationDependsOn(':app')
13+
project.evaluationDependsOn(":app")
2614
}
2715

2816
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=-Xmx4G
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

packages/screen_state/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

packages/screen_state/example/android/settings.gradle

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,21 @@ pluginManagement {
55
def flutterSdkPath = properties.getProperty("flutter.sdk")
66
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
77
return flutterSdkPath
8-
}
9-
settings.ext.flutterSdkPath = flutterSdkPath()
8+
}()
109

11-
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
1211

1312
repositories {
1413
google()
1514
mavenCentral()
1615
gradlePluginPortal()
1716
}
18-
19-
plugins {
20-
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
21-
}
2217
}
2318

2419
plugins {
2520
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
26-
id "com.android.application" version "7.3.0" apply false
21+
id "com.android.application" version "8.1.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2723
}
2824

2925
include ":app"

0 commit comments

Comments
 (0)