Skip to content

Commit 334939d

Browse files
authored
[desktop_drop] add namespace for Android platform (#285)
* [desktop_drop] add namespace for Android platform * [desktop_drop] remove package from manifest
1 parent 379211b commit 334939d

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

packages/desktop_drop/android/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ group 'com.example.desktop_drop'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.5.20'
5+
ext.kotlin_version = '1.9.10'
66
repositories {
77
google()
88
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.2.2'
12+
classpath 'com.android.tools.build:gradle:7.4.2'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -25,7 +25,12 @@ apply plugin: 'com.android.library'
2525
apply plugin: 'kotlin-android'
2626

2727
android {
28-
compileSdkVersion 30
28+
// Conditional for compatibility with AGP <4.2.
29+
if (project.android.hasProperty("namespace")) {
30+
namespace 'one.mixin.desktop.drop'
31+
}
32+
33+
compileSdk 33
2934

3035
compileOptions {
3136
sourceCompatibility JavaVersion.VERSION_1_8

packages/desktop_drop/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-6.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.desktop_drop">
3-
</manifest>
1+
<manifest />

packages/desktop_drop/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 33
29+
compileSdk 33
3030

3131
compileOptions {
3232
sourceCompatibility JavaVersion.VERSION_1_8
@@ -45,7 +45,7 @@ android {
4545
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4646
applicationId "com.example.desktop_drop_example"
4747
minSdkVersion 16
48-
targetSdkVersion 30
48+
targetSdkVersion 33
4949
versionCode flutterVersionCode.toInteger()
5050
versionName flutterVersionName
5151
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
android:theme="@style/LaunchTheme"
1010
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1111
android:hardwareAccelerated="true"
12-
android:windowSoftInputMode="adjustResize">
12+
android:windowSoftInputMode="adjustResize"
13+
android:exported="true">
1314
<!-- Specifies an Android theme to apply to this Activity as soon as
1415
the Android process has started. This theme is visible to the user
1516
while the Flutter UI initializes. After that, this theme continues

packages/desktop_drop/example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.5.20'
2+
ext.kotlin_version = '1.9.10'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.2.2'
9+
classpath 'com.android.tools.build:gradle:7.4.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

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

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

0 commit comments

Comments
 (0)