Skip to content

Commit be99a7b

Browse files
committed
add compatibility with Android Gradle Plugin 8
bump compile sdk to 34 set single package name flutter.overlay.window.flutter_overlay_window set gradle version to 7.3.0
1 parent a861816 commit be99a7b

File tree

10 files changed

+52
-291
lines changed

10 files changed

+52
-291
lines changed

.metadata

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: c860cba910319332564e1e9d470a17074c1f2dfd
8-
channel: stable
7+
revision: "abb292a07e20d696c4568099f918f6c5f330e6b0"
8+
channel: "stable"
99

1010
project_type: plugin
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
17+
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
18+
- platform: android
19+
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
20+
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'

android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
.cxx

android/build.gradle

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
group 'com.example.flutter_overlay_window'
1+
group 'flutter.overlay.window.flutter_overlay_window'
22
version '1.0'
33

44
buildscript {
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.4.0'
11+
classpath 'com.android.tools.build:gradle:7.3.0'
1212
}
1313
}
1414

@@ -22,7 +22,11 @@ rootProject.allprojects {
2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 31
25+
if (project.android.hasProperty("namespace")) {
26+
namespace 'flutter.overlay.window.flutter_overlay_window'
27+
}
28+
29+
compileSdk 34
2630

2731
compileOptions {
2832
sourceCompatibility JavaVersion.VERSION_1_8
@@ -32,4 +36,19 @@ android {
3236
defaultConfig {
3337
minSdkVersion 16
3438
}
39+
40+
dependencies {
41+
testImplementation 'junit:junit:4.13.2'
42+
testImplementation 'org.mockito:mockito-core:5.0.0'
43+
}
44+
45+
testOptions {
46+
unitTests.all {
47+
testLogging {
48+
events "passed", "skipped", "failed", "standardOut", "standardError"
49+
outputs.upToDateWhen {false}
50+
showStandardStreams = true
51+
}
52+
}
53+
}
3554
}
-57.8 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

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

android/gradlew

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

android/gradlew.bat

Lines changed: 0 additions & 89 deletions
This file was deleted.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.flutter_overlay_window">
2-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
3-
<uses-permission android:name="android.permission.WAKE_LOCK" />
4-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
5-
</manifest>
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="flutter.overlay.window.flutter_overlay_window">
3+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
4+
<uses-permission android:name="android.permission.WAKE_LOCK" />
5+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
6+
</manifest>

android/src/main/java/flutter/overlay/window/flutter_overlay_window/OverlayService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import androidx.annotation.RequiresApi;
2828
import androidx.core.app.NotificationCompat;
2929

30-
import com.example.flutter_overlay_window.R;
30+
import flutter.overlay.window.flutter_overlay_window.R;
3131

3232
import java.util.Timer;
3333
import java.util.TimerTask;

android/src/main/java/flutter/overlay/window/flutter_overlay_window/WindowSetup.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package flutter.overlay.window.flutter_overlay_window;
22

3-
43
import android.view.Gravity;
54
import android.view.WindowManager;
65
import androidx.core.app.NotificationCompat;

0 commit comments

Comments
 (0)