Skip to content

Commit

Permalink
[desktop_drop] add namespace for Android platform (#285)
Browse files Browse the repository at this point in the history
* [desktop_drop] add namespace for Android platform

* [desktop_drop] remove package from manifest
  • Loading branch information
AdamVe committed Sep 7, 2023
1 parent 379211b commit 334939d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
11 changes: 8 additions & 3 deletions packages/desktop_drop/android/build.gradle
Expand Up @@ -2,14 +2,14 @@ group 'com.example.desktop_drop'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.5.20'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,7 +25,12 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 30
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'one.mixin.desktop.drop'
}

compileSdk 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
4 changes: 1 addition & 3 deletions packages/desktop_drop/android/src/main/AndroidManifest.xml
@@ -1,3 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.desktop_drop">
</manifest>
<manifest />
4 changes: 2 additions & 2 deletions packages/desktop_drop/example/android/app/build.gradle
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdk 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -45,7 +45,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.desktop_drop_example"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
Expand Up @@ -9,7 +9,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop_drop/example/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.5.20'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

0 comments on commit 334939d

Please sign in to comment.