Skip to content

Commit 4111738

Browse files
committed
2 parents 094fb82 + a50532e commit 4111738

File tree

14 files changed

+60
-41
lines changed

14 files changed

+60
-41
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Publish to pub.dev
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+*'
7+
8+
jobs:
9+
publish:
10+
permissions:
11+
id-token: write # Required for authentication using OIDC
12+
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
13+
# with:
14+
# working-directory: path/to/package/within/repository

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.5.3
2+
Android 更新 SDK 到 2.8.5
3+
14
## 2.5.2
25
iOS 补充getOpid获取
36

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ openinstall插件封装了openinstall平台原生SDK,集成了 **渠道统计,
1212

1313
``` json
1414
dependencies:
15-
openinstall_flutter_plugin: ^2.1.2
15+
openinstall_flutter_plugin: ^2.5.2
1616
```
1717

1818
### 2. 安装插件

android/libs/OpenInstall_v2.8.4.jar

-175 KB
Binary file not shown.

android/libs/OpenInstall_v2.8.5.jar

169 KB
Binary file not shown.

example/android/app/build.gradle

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,38 @@ if (flutterVersionName == null) {
2222
}
2323

2424
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
2526
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2627

2728
android {
28-
compileSdkVersion 33
29+
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
2931

30-
lintOptions {
31-
disable 'InvalidPackage'
32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_1_8
34+
targetCompatibility JavaVersion.VERSION_1_8
3235
}
3336

37+
kotlinOptions {
38+
jvmTarget = '1.8'
39+
}
40+
41+
sourceSets {
42+
main.java.srcDirs += 'src/main/kotlin'
43+
}
3444
defaultConfig {
3545
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3646
applicationId "io.openinstall.openinstall_flutter_plugin_example"
37-
minSdkVersion 16
38-
targetSdkVersion 33
47+
// You can update the following values to match your application needs.
48+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
49+
minSdkVersion flutter.minSdkVersion
50+
targetSdkVersion flutter.targetSdkVersion
3951
versionCode flutterVersionCode.toInteger()
4052
versionName flutterVersionName
41-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42-
4353

4454
manifestPlaceholders = [
4555
OPENINSTALL_APPKEY : "ufp21n",
4656
]
47-
4857
}
4958

5059
buildTypes {
@@ -61,8 +70,7 @@ flutter {
6170
}
6271

6372
dependencies {
64-
testImplementation 'junit:junit:4.12'
65-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
66-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67-
73+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6874
}
75+
76+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<activity
1616
android:name=".MainActivity"
1717
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
18+
android:exported="true"
1819
android:hardwareAccelerated="true"
1920
android:launchMode="singleTask"
2021
android:theme="@style/LaunchTheme"

example/android/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
buildscript {
2+
ext.kotlin_version = '1.7.10'
23
repositories {
34
google()
4-
jcenter()
5+
mavenCentral()
56
}
67

78
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.1.3'
9+
classpath 'com.android.tools.build:gradle:7.2.0'
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
911
}
1012
}
1113

1214
allprojects {
1315
repositories {
1416
google()
15-
jcenter()
17+
mavenCentral()
1618
}
1719
}
1820

@@ -24,6 +26,6 @@ subprojects {
2426
project.evaluationDependsOn(':app')
2527
}
2628

27-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
2830
delete rootProject.buildDir
2931
}

example/android/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
3-
android.useAndroidX=true
2+
android.useAndroidX=true
3+
android.enableJetifier=true
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

example/android/settings.gradle

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
include ':app'
22

3-
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
3+
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4+
def properties = new Properties()
45

5-
def plugins = new Properties()
6-
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7-
if (pluginsFile.exists()) {
8-
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9-
}
6+
assert localPropertiesFile.exists()
7+
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
108

11-
plugins.each { name, path ->
12-
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13-
include ":$name"
14-
project(":$name").projectDir = pluginDirectory
15-
}
9+
def flutterSdkPath = properties.getProperty("flutter.sdk")
10+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11+
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/sh
22
# This is a generated file; do not edit or check into version control.
33
export "FLUTTER_ROOT=D:\Android\flutter"
4-
export "FLUTTER_APPLICATION_PATH=D:\workspace\OP\openinstall_flutter_plugin\example"
4+
export "FLUTTER_APPLICATION_PATH=D:\workspace\op-github\openinstall_flutter_plugin\example"
5+
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
56
export "FLUTTER_TARGET=lib\main.dart"
67
export "FLUTTER_BUILD_DIR=build"
7-
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
88
export "FLUTTER_BUILD_NAME=1.0.0"
99
export "FLUTTER_BUILD_NUMBER=1"
1010
export "DART_OBFUSCATION=false"
11-
export "TRACK_WIDGET_CREATION=false"
11+
export "TRACK_WIDGET_CREATION=true"
1212
export "TREE_SHAKE_ICONS=false"
13-
export "PACKAGE_CONFIG=.packages"
13+
export "PACKAGE_CONFIG=.dart_tool/package_config.json"

example/pubspec.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ dependencies:
99
flutter:
1010
sdk: flutter
1111

12-
# The following adds the Cupertino Icons font to your application.
13-
# Use with the CupertinoIcons class for iOS style icons.
14-
cupertino_icons: ^0.1.2
15-
1612
dev_dependencies:
1713
flutter_test:
1814
sdk: flutter

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: openinstall_flutter_plugin
22
description: openinstall_flutter_plugin is a Flutter plugin based on openinstall, and with null safety support.
3-
version: 2.5.2
3+
version: 2.5.3
44
homepage: https://www.openinstall.io
55

66
environment:

0 commit comments

Comments
 (0)