mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-05-17 15:26:37 +08:00
feature 5.0.0
This commit is contained in:
16
README.md
16
README.md
@ -3,7 +3,7 @@
|
||||
[](https://pub.dev/packages/tencent_kit)
|
||||
[](https://github.com/RxReader/tencent_kit/blob/master/LICENSE)
|
||||
|
||||
flutter版腾讯(QQ)SDK
|
||||
Flutter 版腾讯(QQ)SDK
|
||||
|
||||
## 相关工具
|
||||
|
||||
@ -29,19 +29,9 @@ flutter版腾讯(QQ)SDK
|
||||
|
||||
### Android
|
||||
|
||||
* 接入
|
||||
|
||||
```groovy
|
||||
android {
|
||||
defaultConfig{
|
||||
manifestPlaceholders += [
|
||||
TENCENT_APP_ID: "your tencent appId"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
# 不需要做任何额外接入工作
|
||||
# 配置已集成到脚本里
|
||||
# 混淆已打入 Library,随 Library 引用,自动添加到 apk 打包混淆
|
||||
```
|
||||
|
||||
|
@ -16,6 +16,7 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath 'org.yaml:snakeyaml:1.17'
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,6 +46,12 @@ android {
|
||||
|
||||
// library 混淆 -> 随 library 引用,自动添加到 apk 打包混淆
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
|
||||
File root_project_dir = rootProject.projectDir.parentFile
|
||||
def cfg = new org.yaml.snakeyaml.Yaml().load(new File(root_project_dir, 'pubspec.yaml').text)
|
||||
manifestPlaceholders += [
|
||||
TENCENT_APP_ID: cfg.tencent_kit?.app_id
|
||||
]
|
||||
}
|
||||
|
||||
flavorDimensions 'vendor'
|
||||
|
@ -1,39 +0,0 @@
|
||||
//
|
||||
//使用方法
|
||||
//
|
||||
//apply from: 'tencent-setup.gradle'
|
||||
//
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath 'org.yaml:snakeyaml:1.17'
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: TencentSetupPlugin
|
||||
|
||||
class TencentSetupPlugin implements Plugin<Project> {
|
||||
@Override
|
||||
void apply(Project target) {
|
||||
target.plugins.withId('com.android.application') {
|
||||
File root_project_dir = target.rootProject.projectDir.parentFile
|
||||
File pubspec = new File(root_project_dir, 'pubspec.yaml')
|
||||
def cfg = new org.yaml.snakeyaml.Yaml().load(pubspec.text)
|
||||
target.android.defaultConfig.manifestPlaceholders += [
|
||||
TENCENT_APP_ID: cfg.tencent_kit?.app_id
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -24,7 +24,6 @@ if (flutterVersionName == null) {
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
apply from: "${project(":tencent_kit").projectDir}/tencent-setup.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
|
Reference in New Issue
Block a user