Skip to content

Commit

Permalink
add compatibility with Android Gradle Plugin 8
Browse files Browse the repository at this point in the history
bump compile sdk to 34

set single package name flutter.overlay.window.flutter_overlay_window

set gradle version to 7.3.0
  • Loading branch information
serhiisdev committed Feb 27, 2024
1 parent a861816 commit be99a7b
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 291 deletions.
24 changes: 22 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
# This file should be version controlled and should not be manually edited.

version:
revision: c860cba910319332564e1e9d470a17074c1f2dfd
channel: stable
revision: "abb292a07e20d696c4568099f918f6c5f330e6b0"
channel: "stable"

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
- platform: android
create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0
base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.DS_Store
/build
/captures
.cxx
25 changes: 22 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'com.example.flutter_overlay_window'
group 'flutter.overlay.window.flutter_overlay_window'
version '1.0'

buildscript {
Expand All @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

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

android {
compileSdkVersion 31
if (project.android.hasProperty("namespace")) {
namespace 'flutter.overlay.window.flutter_overlay_window'
}

compileSdk 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -32,4 +36,19 @@ android {
defaultConfig {
minSdkVersion 16
}

dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.0.0'
}

testOptions {
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
}
}
Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

185 changes: 0 additions & 185 deletions android/gradlew

This file was deleted.

89 changes: 0 additions & 89 deletions android/gradlew.bat

This file was deleted.

11 changes: 6 additions & 5 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.flutter_overlay_window">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.overlay.window.flutter_overlay_window">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;

import com.example.flutter_overlay_window.R;
import flutter.overlay.window.flutter_overlay_window.R;

import java.util.Timer;
import java.util.TimerTask;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package flutter.overlay.window.flutter_overlay_window;


import android.view.Gravity;
import android.view.WindowManager;
import androidx.core.app.NotificationCompat;
Expand Down

0 comments on commit be99a7b

Please sign in to comment.