Skip to content

Commit 1965646

Browse files
committed
🎉 完成首版
0 parents  commit 1965646

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+987
-0
lines changed

.github/workflows/flutter.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build
2+
3+
# This workflow is triggered on pushes to the repository.
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
build:
12+
# This job will run on macos virtual machine
13+
runs-on: macos-13
14+
steps:
15+
16+
# Setup Java environment in order to build the Android app.
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-java@v3
19+
with:
20+
distribution: 'temurin'
21+
java-version: '11'
22+
cache: 'gradle'
23+
# Setup the flutter environment.
24+
- uses: subosito/flutter-action@v2
25+
with:
26+
channel: 'stable' # 'dev', 'alpha', default to: 'stable'
27+
# flutter-version: '1.22.x' # you can also specify exact version of flutter
28+
29+
# Get flutter dependencies.
30+
- run: flutter pub get
31+
32+
# Check for any formatting issues in the code.
33+
- run: dart format --set-exit-if-changed .
34+
35+
# Statically analyze the Dart code for any errors.
36+
- run: dart analyze .
37+
38+
#####
39+
# Build app
40+
#####
41+
# Build apk.
42+
# - run: cd example && flutter build apk
43+
# Build ios
44+
# - run: cd example && flutter build ios --no-codesign

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
create_release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Extract version from tag
16+
id: extract_version
17+
run: |
18+
VERSION=${GITHUB_REF#refs/tags/v}
19+
echo "VERSION=$VERSION" >> $GITHUB_ENV
20+
21+
- name: Read release notes
22+
id: release_notes
23+
run: |
24+
VERSION=${{ env.VERSION }}
25+
CHANGELOG=$(sed -n "/## $VERSION/,/^## /p" CHANGELOG.md | sed '$d' | tail -n +2)
26+
if [ -z "$CHANGELOG" ]; then
27+
echo "Release notes not found for version $VERSION"
28+
exit 1
29+
fi
30+
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
31+
echo "$CHANGELOG" >> $GITHUB_ENV
32+
echo "EOF" >> $GITHUB_ENV
33+
34+
- name: Create GitHub release
35+
uses: softprops/action-gh-release@v2
36+
with:
37+
body: ${{ env.RELEASE_NOTES }}
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
build/

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## 1.0.0
2+
3+
* 🎉 发布第一个版本
4+
* 🍎 支持开屏广告
5+
* 🍎 支持插屏广告
6+
* 🍎 支持激励视频广告
7+
* 🍎 支持信息流广告

LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Copyright (c) 2024 FlutterAds ([email protected])
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to use
5+
the Software subject to the following conditions:
6+
7+
1. The above copyright notice and this permission notice shall be included in all
8+
copies or substantial portions of the Software.
9+
10+
2. Users may freely use this Software in their applications, but must include
11+
appropriate attribution to FlutterAds.
12+
13+
3. Modification, redistribution, reselling, sublicensing, or commercial
14+
distribution of the Software or any derivative works is prohibited without
15+
explicit written permission from FlutterAds.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<h1 align="center">📱 Flutter HarmonyOS Ads</h1>
2+
<h3 align="center">一款优质的 Flutter 鸿蒙系统广告插件,帮助你在鸿蒙平台快速变现</h3>
3+
<p align="center">♻️ 持续更新 ♻️</p>
4+
5+
<p align="center">
6+
<a href="https://pub.dev/packages/flutter_ohos_ads">
7+
<img src="https://img.shields.io/pub/v/flutter_ohos_ads?logo=dart"/>
8+
<img src="https://img.shields.io/badge/OS-HarmonyOS-blue?logo=preact"/>
9+
</a>
10+
<a href="https://github.com/FlutterAds/flutter_ohos_ads">
11+
<img src="https://github.com/FlutterAds/flutter_ohos_ads/actions/workflows/flutter.yml/badge.svg">
12+
<img src=https://img.shields.io/github/stars/FlutterAds/flutter_ohos_ads?color=brightgreen>
13+
</a>
14+
<a href="https://flutterads.top/">
15+
<img src="https://img.shields.io/badge/Pro-v2.0.0-success?logo=flutter&logoColor=FFD700"/>
16+
<a href="https://flutterads.top/">
17+
<img src="https://img.shields.io/badge/Site-FlutterAds-success?logo=webtrees&logoColor=FFD700"/>
18+
</a>
19+
</p>
20+
21+
## 🚀 核心功能
22+
23+
- ✅ 开屏广告
24+
- ✅ 插屏广告
25+
- ✅ 激励视频
26+
- ✅ 横幅广告
27+
- ✅ 信息流
28+
29+
30+
## 📃 接入文档
31+
32+
- [ 🎯 极速接入、快速体验、持续更新](https://flutterads.top/)
33+
34+
35+
## 📌 广告系列插件(FlutterAds)
36+
|插件|描述|
37+
|-|-|
38+
|[flutter_gromore_pro](https://flutterads.top/)|🏆🏆🏆 帮你大幅提升广告收益,发挥出最大的用户价值|
39+
|[flutter_gromore_ads](https://github.com/FlutterAds/flutter_gromore_ads)|字节跳动、穿山甲、GroMore 聚合 Flutter 广告开源版插件|
40+
|[flutter_pangle_ads](https://github.com/FlutterAds/flutter_pangle_ads)|字节跳动、穿山甲 Flutter 广告插件|
41+
|[flutter_pangle_global_ads](https://github.com/FlutterAds/flutter_pangle_global_ads)|字节跳动、穿山甲国际版 Flutter 广告插件 ~ [🚀 Pro 版](https://global.flutterads.top/)|
42+
|[flutter_qq_ads](https://github.com/FlutterAds/flutter_qq_ads)|腾讯广告、广点通、优量汇 Flutter 广告插件|
43+
|[flutter_ohos_ads](https://github.com/FlutterAds/flutter_qq_ads)|HarmonyOS 鸿蒙 Flutter 广告变现插件|
44+
|[flutter_adspark](https://github.com/FlutterAds/flutter_adspark)|巨量广告/穿山甲的广告监测、增长分析、归因上报、事件管理 Flutter 版插件|
45+
|[flutter_adcontent](https://github.com/FlutterAds/flutter_adcontent)|穿山甲内容输出 Flutter 版插件,支持短剧、小视频、短故事(小说)|

analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.cxx

android/build.gradle

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
group = "com.zero.flutter_ohos_ads"
2+
version = "1.0"
3+
4+
buildscript {
5+
repositories {
6+
google()
7+
mavenCentral()
8+
}
9+
10+
dependencies {
11+
classpath("com.android.tools.build:gradle:8.1.0")
12+
}
13+
}
14+
15+
rootProject.allprojects {
16+
repositories {
17+
google()
18+
mavenCentral()
19+
}
20+
}
21+
22+
apply plugin: "com.android.library"
23+
24+
android {
25+
if (project.android.hasProperty("namespace")) {
26+
namespace = "com.zero.flutter_ohos_ads"
27+
}
28+
29+
compileSdk = 34
30+
31+
compileOptions {
32+
sourceCompatibility = JavaVersion.VERSION_1_8
33+
targetCompatibility = JavaVersion.VERSION_1_8
34+
}
35+
36+
defaultConfig {
37+
minSdk = 21
38+
}
39+
40+
dependencies {
41+
testImplementation("junit:junit:4.13.2")
42+
testImplementation("org.mockito:mockito-core:5.0.0")
43+
}
44+
45+
testOptions {
46+
unitTests.all {
47+
testLogging {
48+
events "passed", "skipped", "failed", "standardOut", "standardError"
49+
outputs.upToDateWhen {false}
50+
showStandardStreams = true
51+
}
52+
}
53+
}
54+
}

android/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'flutter_ohos_ads'

0 commit comments

Comments
 (0)