From eef3dbed4160a1c6c2760bb1051c9daf5c1cdc0f Mon Sep 17 00:00:00 2001 From: xuexiangjys Date: Tue, 28 Mar 2023 00:41:13 +0800 Subject: [PATCH] release version 3.0.0 --- CHANGELOG.md | 4 +++ README.md | 4 +-- android/build.gradle | 22 +++++++------- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/app/build.gradle | 16 +++++----- .../android/app/src/main/AndroidManifest.xml | 30 ++++++++++--------- .../flutter_xupdate_example/MainActivity.java | 8 ----- .../app/src/main/res/values/styles.xml | 3 ++ example/android/build.gradle | 12 ++++---- .../gradle/wrapper/gradle-wrapper.properties | 2 +- pubspec.yaml | 8 ++--- 11 files changed, 57 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f6890c..954ffd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.0 + +support flutter 3.0 + ## 2.0.4 * Upgrade dependent library version. diff --git a/README.md b/README.md index 695abbd..84a02a6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # flutter_xupdate -[![Version](https://img.shields.io/badge/version-2.0.4-blue.svg)](https://pub.dev/packages/flutter_xupdate) +[![Version](https://img.shields.io/badge/version-3.0.0-blue.svg)](https://pub.dev/packages/flutter_xupdate) [![Build Status](https://travis-ci.org/xuexiangjys/flutter_xupdate.svg?branch=master)](https://travis-ci.org/xuexiangjys/flutter_xupdate) [![Issue](https://img.shields.io/github/issues/xuexiangjys/flutter_xupdate.svg)](https://github.com/xuexiangjys/flutter_xupdate/issues) [![Star](https://img.shields.io/github/stars/xuexiangjys/flutter_xupdate.svg)](https://github.com/xuexiangjys/flutter_xupdate) @@ -28,7 +28,7 @@ You should ensure that you add the `flutter_xupdate` as a dependency in your flu ``` // pub 集成 dependencies: - flutter_xupdate: ^2.0.4 + flutter_xupdate: ^3.0.0 //github 集成 dependencies: diff --git a/android/build.gradle b/android/build.gradle index 444248c..09b50ec 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,23 +1,21 @@ group 'com.xuexiang.flutter_xupdate' -version '2.0.4' +version '3.0.0' buildscript { repositories { - google() - mavenCentral() - jcenter { url 'https://maven.aliyun.com/repository/jcenter' } + google { url'https://maven.aliyun.com/repository/google'} + maven { url 'https://maven.aliyun.com/repository/public' } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:7.2.0' } } rootProject.allprojects { repositories { - google() - mavenCentral() - jcenter { url 'https://maven.aliyun.com/repository/jcenter' } + google { url'https://maven.aliyun.com/repository/google'} + maven { url 'https://maven.aliyun.com/repository/public' } maven { url "https://jitpack.io" } } } @@ -25,11 +23,15 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 31 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } defaultConfig { minSdkVersion 16 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { disable 'InvalidPackage' diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 01a286e..a0419d7 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -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-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index e7e6a77..f910972 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,7 +25,13 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } lintOptions { disable 'InvalidPackage' @@ -34,11 +40,10 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.xuexiang.flutter_xupdate_example" - minSdkVersion 16 - targetSdkVersion 28 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" //打包时推荐使用原生打包,如果嫌打的包太大,可以配置如下信息,按需打包 // ndk { @@ -70,7 +75,4 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 4d28c8f..d3c0a4c 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,30 +1,32 @@ - + + android:name="${applicationName}" + android:icon="@mipmap/ic_launcher" + android:label="flutter_xupdate_example"> + - - + + - + + diff --git a/example/android/app/src/main/java/com/xuexiang/flutter_xupdate_example/MainActivity.java b/example/android/app/src/main/java/com/xuexiang/flutter_xupdate_example/MainActivity.java index 19b6f8f..57f6fc9 100644 --- a/example/android/app/src/main/java/com/xuexiang/flutter_xupdate_example/MainActivity.java +++ b/example/android/app/src/main/java/com/xuexiang/flutter_xupdate_example/MainActivity.java @@ -1,14 +1,6 @@ package com.xuexiang.flutter_xupdate_example; -import androidx.annotation.NonNull; - import io.flutter.embedding.android.FlutterFragmentActivity; -import io.flutter.embedding.engine.FlutterEngine; -import io.flutter.plugins.GeneratedPluginRegistrant; public class MainActivity extends FlutterFragmentActivity { - @Override - public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { - GeneratedPluginRegistrant.registerWith(flutterEngine); - } } diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index f9b1bb2..51dd6ab 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -5,4 +5,7 @@ Flutter draws its first frame --> @drawable/launch_background + diff --git a/example/android/build.gradle b/example/android/build.gradle index d8db2fb..f6c321a 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,20 +1,18 @@ buildscript { repositories { - google() - mavenCentral() - jcenter { url 'https://maven.aliyun.com/repository/jcenter' } + google { url'https://maven.aliyun.com/repository/google'} + maven { url 'https://maven.aliyun.com/repository/public' } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:7.2.0' } } allprojects { repositories { - google() - mavenCentral() - jcenter { url 'https://maven.aliyun.com/repository/jcenter' } + google { url'https://maven.aliyun.com/repository/google'} + maven { url 'https://maven.aliyun.com/repository/public' } } } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146..6b66533 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -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-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/pubspec.yaml b/pubspec.yaml index 10394dc..c8aca32 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,18 +1,18 @@ name: flutter_xupdate description: A Flutter plugin for XUpdate(Android Version Update Library). -version: 2.0.4 +version: 3.0.0 homepage: https://github.com/xuexiangjys/flutter_xupdate repository: https://github.com/xuexiangjys/flutter_xupdate issue_tracker: https://github.com/xuexiangjys/flutter_xupdate/issues environment: - sdk: '>=2.12.0 <3.0.0' - flutter: '>=1.10.0' + sdk: '>=2.19.5 <3.0.0' + flutter: ">=2.5.0" dependencies: flutter: sdk: flutter - package_info_plus: ^1.3.0 + package_info_plus: ^3.0.3 dev_dependencies: flutter_test: