-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Create a rebuild script for in_app_purchases codelab
#2268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
domesticmouse
merged 7 commits into
flutter:main
from
domesticmouse:automate-in_app_purchases
Dec 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3c78c87
Create a rebuild script
domesticmouse 0b8696b
`dart format`
domesticmouse ef5b277
Add complete step, and various updates
domesticmouse da1bc26
Bump minSdk for firebase_auth
domesticmouse 200e826
Elide `intro_flutter_gpu` due to breakage on `main`
domesticmouse 59c6b5f
Merge branch 'elide-intro_flutter_gpu' of https://github.com/domestic…
domesticmouse 256023c
Merge branch 'flutter:main' into automate-in_app_purchases
domesticmouse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,71 +1,44 @@ | ||
| def localProperties = new Properties() | ||
| def localPropertiesFile = rootProject.file('local.properties') | ||
| if (localPropertiesFile.exists()) { | ||
| localPropertiesFile.withReader('UTF-8') { reader -> | ||
| localProperties.load(reader) | ||
| } | ||
| } | ||
|
|
||
| def flutterRoot = localProperties.getProperty('flutter.sdk') | ||
| if (flutterRoot == null) { | ||
| throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") | ||
| } | ||
|
|
||
| def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
| if (flutterVersionCode == null) { | ||
| flutterVersionCode = '1' | ||
| } | ||
|
|
||
| def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
| if (flutterVersionName == null) { | ||
| flutterVersionName = '1.0' | ||
| plugins { | ||
| id "com.android.application" | ||
| id "kotlin-android" | ||
| // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. | ||
| id "dev.flutter.flutter-gradle-plugin" | ||
| } | ||
|
|
||
| apply plugin: 'com.android.application' | ||
| apply plugin: 'kotlin-android' | ||
| apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
|
||
| android { | ||
| compileSdkVersion 31 | ||
| namespace = "com.example.dashclicker" | ||
| compileSdk = flutter.compileSdkVersion | ||
| ndkVersion = flutter.ndkVersion | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_11 | ||
| targetCompatibility JavaVersion.VERSION_11 | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| kotlinOptions { | ||
| jvmTarget = '11' | ||
| } | ||
|
|
||
| sourceSets { | ||
| main.java.srcDirs += 'src/main/kotlin' | ||
| jvmTarget = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| defaultConfig { | ||
| // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
| applicationId "com.example.dashclicker" | ||
| minSdkVersion 19 | ||
| targetSdkVersion 30 | ||
| versionCode flutterVersionCode.toInteger() | ||
| versionName flutterVersionName | ||
| multiDexEnabled true | ||
| applicationId = "com.example.dashclicker" | ||
| // You can update the following values to match your application needs. | ||
| // For more information, see: https://flutter.dev/to/review-gradle-config. | ||
| minSdk = flutter.minSdkVersion | ||
| targetSdk = flutter.targetSdkVersion | ||
| versionCode = flutter.versionCode | ||
| versionName = flutter.versionName | ||
| } | ||
|
|
||
| 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.debug | ||
| } | ||
| } | ||
| } | ||
|
|
||
| flutter { | ||
| source '../..' | ||
| source = "../.." | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
| } | ||
|
|
||
| apply plugin: 'com.google.gms.google-services' |
6 changes: 3 additions & 3 deletions
6
in_app_purchases/step_00/app/android/app/src/debug/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
in_app_purchases/step_00/app/android/app/src/profile/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,18 @@ | ||
| buildscript { | ||
| ext.kotlin_version = '1.6.21' | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:7.0.4' | ||
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
| classpath 'com.google.gms:google-services:4.3.10' | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| } | ||
| } | ||
|
|
||
| rootProject.buildDir = '../build' | ||
| rootProject.buildDir = "../build" | ||
| subprojects { | ||
| project.buildDir = "${rootProject.buildDir}/${project.name}" | ||
| } | ||
| subprojects { | ||
| project.evaluationDependsOn(':app') | ||
| project.evaluationDependsOn(":app") | ||
| } | ||
|
|
||
| task clean(type: Delete) { | ||
| tasks.register("clean", Delete) { | ||
| delete rootProject.buildDir | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| org.gradle.jvmargs=-Xmx1536M | ||
| org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError | ||
| android.useAndroidX=true | ||
| android.enableJetifier=true |
3 changes: 1 addition & 2 deletions
3
in_app_purchases/step_00/app/android/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| #Fri Jun 23 08:50:38 CEST 2017 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,25 @@ | ||
| include ':app' | ||
| pluginManagement { | ||
| def flutterSdkPath = { | ||
| def properties = new Properties() | ||
| file("local.properties").withInputStream { properties.load(it) } | ||
| def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
| assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
| return flutterSdkPath | ||
| }() | ||
|
|
||
| def localPropertiesFile = new File(rootProject.projectDir, "local.properties") | ||
| def properties = new Properties() | ||
| includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") | ||
|
|
||
| assert localPropertiesFile.exists() | ||
| localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| gradlePluginPortal() | ||
| } | ||
| } | ||
|
|
||
| def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
| assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
| apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" | ||
| plugins { | ||
| id "dev.flutter.flutter-plugin-loader" version "1.0.0" | ||
| id "com.android.application" version "8.1.0" apply false | ||
| id "org.jetbrains.kotlin.android" version "1.8.22" apply false | ||
| } | ||
|
|
||
| include ":app" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.