Skip to content

Commit 9122409

Browse files
committed
Update samples/ads
flutter pub upgrade --major-versions rm -rf ios android && flutter create . --platforms android,ios
1 parent fa96d26 commit 9122409

Some content is hidden

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

55 files changed

+172
-327
lines changed

samples/ads/.metadata

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "9e1c857886f07d342cf106f2cd588bcd5e031bb2"
7+
revision: "be698c48a6750c8cb8e61c740ca9991bb947aba2"
88
channel: "stable"
99

1010
project_type: app
@@ -13,14 +13,14 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 9e1c857886f07d342cf106f2cd588bcd5e031bb2
17-
base_revision: 9e1c857886f07d342cf106f2cd588bcd5e031bb2
16+
create_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
17+
base_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
1818
- platform: android
19-
create_revision: 9e1c857886f07d342cf106f2cd588bcd5e031bb2
20-
base_revision: 9e1c857886f07d342cf106f2cd588bcd5e031bb2
19+
create_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
20+
base_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
2121
- platform: ios
22-
create_revision: 9e1c857886f07d342cf106f2cd588bcd5e031bb2
23-
base_revision: 9e1c857886f07d342cf106f2cd588bcd5e031bb2
22+
create_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
23+
base_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
2424

2525
# User provided section
2626

samples/ads/android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

samples/ads/android/app/build.gradle

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id("dev.flutter.flutter-gradle-plugin")
6+
}
7+
8+
android {
9+
namespace = "com.example.ads"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.example.ads"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}

samples/ads/android/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application
3-
android:label="basic"
3+
android:label="ads"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity
77
android:name=".MainActivity"
88
android:exported="true"
99
android:launchMode="singleTop"
10+
android:taskAffinity=""
1011
android:theme="@style/LaunchTheme"
1112
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1213
android:hardwareAccelerated="true"
@@ -29,10 +30,16 @@
2930
<meta-data
3031
android:name="flutterEmbedding"
3132
android:value="2" />
32-
33-
<!-- TODO: change this to your own AdMob App ID -->
34-
<meta-data
35-
android:name="com.google.android.gms.ads.APPLICATION_ID"
36-
android:value="ca-app-pub-3940256099942544~3347511713"/>
3733
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
3845
</manifest>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.example.ads
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity : FlutterActivity()

samples/ads/android/app/src/main/kotlin/com/example/basic/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)