Skip to content

Commit

Permalink
Merge branch 'develop' into 2x
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesZero committed Sep 26, 2021
2 parents 8fadde7 + 90ecec4 commit a2ea0ee
Show file tree
Hide file tree
Showing 44 changed files with 233 additions and 211 deletions.
1 change: 0 additions & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: '8.x'

# Setup the flutter environment.
- uses: subosito/flutter-action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Permission
run: sudo chown -R $USER $PWD
- name: Build APK
run: cd example && flutter build apk --target-platform android-arm
run: cd example && flutter build apk
- name: Upload to Pgyer
run: |
result=$(curl -F 'file=@example/build/app/outputs/apk/release/app-release.apk' -F '_api_key=${{ secrets.PGYER_API_KEY }}' https://www.pgyer.com/apiv2/app/upload)
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.3.0 [2021-09-26]
* 修复同时引入 [flutter_pangle_ads](https://github.com/FlutterAds/flutter_pangle_ads) 依赖时 iOS 无法编译的问题 #11
* 优化底层架构
* 更新 Android SDK `v4.410.1280`

## 2.2.0 [2021-09-01]
* 新增 Banner 广告
* 项目增加 CI/CD 检查和自动发布,提高项目质量
Expand All @@ -24,6 +29,11 @@
* 2.x.x 是 Null Safety 版本
* 现在阶段会同时维护这 2 个版本,再往后可能仅维护一个版本

## 1.3.0 [2021-09-26]
* 修复同时引入 [flutter_pangle_ads](https://github.com/FlutterAds/flutter_pangle_ads) 依赖时 iOS 无法编译的问题 #11
* 优化底层架构
* 更新 Android SDK `v4.410.1280`

## 1.2.0 [2021-09-01]
* 新增 Banner 广告
* 项目增加 CI/CD 检查和自动发布,提高项目质量
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<h3 align="center">一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇)</h3>

<p align="center">
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/version-v1.2.0-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/null_safety-v2.2.0-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/version-v1.3.0-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/null_safety-v2.3.0-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/platform-iOS%20%7C%20Android-brightgreen></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads/actions/workflows/flutter.yml"><img src="https://github.com/FlutterAds/flutter_qq_ads/actions/workflows/flutter.yml/badge.svg?branch=2x"></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/github/stars/FlutterAds/flutter_qq_ads?color=brightgreen></a>
Expand All @@ -29,15 +29,15 @@
- 🔲 信息流

## 下载体验
<img src="https://www.pgyer.com/app/qrcode/fadsqq" width='100' height='100'>
<a href="https://www.pgyer.com/app/qrcode/fadsqq"><img src="https://www.pgyer.com/app/qrcode/fadsqq" width='100' height='100'></a>

## 入门使用
### 引入依赖

``` Dart
dependencies:
flutter_qq_ads: ^1.2.0 # 非 Null Safety 版本
flutter_qq_ads: ^2.2.0 # Null Safety 版本
flutter_qq_ads: ^1.3.0 # 非 Null Safety 版本
flutter_qq_ads: ^2.3.0 # Null Safety 版本
```

### 初始化广告
Expand Down Expand Up @@ -273,12 +273,15 @@ pod install
|master|稳定分支,非 Null Safety|
|2x|稳定分支,Null Safety|

## 更新日志
[查看 Releases 版本日志](https://github.com/FlutterAds/flutter_qq_ads/releases)

## 遇到问题
如果你遇到问题请提 [Issues](https://github.com/FlutterAds/flutter_qq_ads/issues) 给我(提问前建议先搜索尝试,没有再提问)

## 支持开源

支持开源项目最好的方式就是用 1 秒点个免费的 [Star](https://github.com/FlutterAds/flutter_qq_ads)
支持开源项目最好的方式就是点个免费的 [Star](https://github.com/FlutterAds/flutter_qq_ads) ⭐️

## FlutterAds 系列插件
|插件|描述|
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.5.4'
}
}

Expand Down Expand Up @@ -38,5 +38,5 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
// 广告 SDK
implementation 'com.qq.e.union:union:4.400.1270'
implementation 'com.qq.e.union:union:4.410.1280'
}
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void getPlatformVersion(MethodCall call, MethodChannel.Result result) {
}

/**
* 展示 Banner 广告
* 注册 Banner 广告
*/
public void registerBannerView() {
bind.getPlatformViewRegistry()
Expand Down
17 changes: 15 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29

ndkVersion "21.4.7075529"
lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -41,11 +41,24 @@ android {
versionName flutterVersionName
}

//签名信息
signingConfigs {
release {
storeFile new File("${project.projectDir}/keystore/flutterads_key.jks")
storePassword "FlutterAds"
keyAlias 'FlutterAdsQQ'
keyPassword "FlutterAds"
//2个版本的签名
v1SigningEnabled true
v2SigningEnabled true
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}

Expand Down
Binary file added example/android/app/keystore/flutterads_key.jks
Binary file not shown.
4 changes: 3 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.zero.flutter_qq_ads_example">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
Expand All @@ -10,7 +11,8 @@
android:name="io.flutter.app.FlutterApplication"
android:label="FlutterAds"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:replace="android:label">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.5.4'
}
}

Expand Down
1 change: 0 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

Expand Down
26 changes: 22 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
78E0F194155FCDCAA5357F20 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C915C4CA07A72F4855877B32 /* Pods_Runner.framework */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
F338711D77866A5FC451221D /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B6BE2D926049C7A403B1AE5 /* libPods-Runner.a */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -33,6 +33,7 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
1B6BE2D926049C7A403B1AE5 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -47,7 +48,6 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B3363BB709C9454F707FE79F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
C915C4CA07A72F4855877B32 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FB0855A14A7438361972E7F8 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -56,7 +56,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78E0F194155FCDCAA5357F20 /* Pods_Runner.framework in Frameworks */,
F338711D77866A5FC451221D /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -66,7 +66,7 @@
8D7BC67F2083DABE2025C066 /* Frameworks */ = {
isa = PBXGroup;
children = (
C915C4CA07A72F4855877B32 /* Pods_Runner.framework */,
1B6BE2D926049C7A403B1AE5 /* libPods-Runner.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -149,6 +149,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
0DD52AD8226E90C038FBB76E /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -206,6 +207,23 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0DD52AD8226E90C038FBB76E /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
5 changes: 3 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: FlutterAds 优量汇广告 SDK 插件示例
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 2.2.0+12
version: 2.3.0+12

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -23,7 +23,8 @@ dependencies:

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.3
cupertino_icons: ^1.0.0
flutter_pangle_ads: ^1.3.0

dev_dependencies:
flutter_test:
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module app_store

go 1.16

require github.com/flutter/flutter v2.2.3 // indirect
25 changes: 0 additions & 25 deletions ios/Classes/Event/AdEventAction.h

This file was deleted.

26 changes: 0 additions & 26 deletions ios/Classes/Event/AdEventAction.m

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// AdErrorEvent.h
// FAQAdErrorEvent.h
// flutter_qq_ads
//
// Created by zero on 2021/8/13.
//

#import "AdEvent.h"
#import "FAQAdEvent.h"
// 广告错误事件
@interface AdErrorEvent : AdEvent
@interface FAQAdErrorEvent : FAQAdEvent
// 错误码
@property (assign, nonatomic) NSNumber* errCode;
// 错误信息
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//
// AdErrorEvent.m
// FAQAdErrorEvent.m
// flutter_qq_ads
//
// Created by zero on 2021/8/13.
//

#import "AdErrorEvent.h"
#import "AdEventAction.h"
#import "FAQAdErrorEvent.h"
#import "FAQAdEventAction.h"

@implementation AdErrorEvent
@implementation FAQAdErrorEvent

- (id)initWithAdId:(NSString *)adId errCode:(NSNumber *)errCode errMsg:(NSString *)errMsg{
self.adId=adId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// AdEvent.h
// FAQAdEvent.h
// flutter_qq_ads
//
// Created by zero on 2021/8/13.
//

#import <Foundation/Foundation.h>
// 广告事件
@interface AdEvent : NSObject
@interface FAQAdEvent : NSObject
// 广告 id
@property (copy, nonatomic) NSString *adId;
// 操作
Expand Down
Loading

0 comments on commit a2ea0ee

Please sign in to comment.