Skip to content

Commit

Permalink
✨ 适配新版 Flutter 编译
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesZero committed Jan 20, 2025
1 parent bef0fda commit 5577e61
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 295 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@

build/
shell/
.idea/
.vscode/
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
if (project.android.hasProperty("namespace")) {
namespace = "com.zero.flutter_gromore_ads"
}
compileSdk 31
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

android {
namespace = "com.zero.flutter_gromore_ads_example"
compileSdk = flutter.compileSdkVersion
compileSdk = 34
ndkVersion = flutter.ndkVersion

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

include ":app"
36 changes: 0 additions & 36 deletions example/lib/ads_config.dart

This file was deleted.

249 changes: 0 additions & 249 deletions example/lib/home_page.dart

This file was deleted.

4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';

import 'home_page.dart';
import 'pro_page.dart';

void main() {
// 绑定引擎
Expand All @@ -20,7 +20,7 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: HomePage(),
home: ProPage(),
);
}
}
10 changes: 5 additions & 5 deletions example/lib/pro_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class _ProPageState extends State<ProPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Pro 版付费功能'),
title: const Text('Pro 版体验'),
),
body: SingleChildScrollView(
child: Column(
Expand All @@ -22,20 +22,20 @@ class _ProPageState extends State<ProPage> {
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text(
'此功能是插件 Pro 版付费功能,需要购买插件后才能使用\n请联系微信:toponelan 咨询购买并获得技术支持',
'开源版不提供示例,请扫码下载 Pro 版体验',
textAlign: TextAlign.center,
),
),
),
Image.asset(
'assets/images/img_pro.png',
Image.network(
'https://flutterads.top/gzh_qrcode.webp',
fit: BoxFit.cover,
),
const Center(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text(
'日活 10W 以上,可咨询其他合作模式,目前已有百万级别的客户在合作,获得了非常好的收益提升',
'扫码关注公众号回复【Pro】,即可下载体验',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.purple,
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 3.2.0+16

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down

0 comments on commit 5577e61

Please sign in to comment.