forked from yaso_meth/mih-project
android config to handle google mobile ad
This commit is contained in:
@@ -31,9 +31,9 @@ if (keystorePropertiesFile.exists()) {
|
||||
android {
|
||||
namespace "za.co.mzansiinnovationhub.mih"
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion = "27.0.12077973"
|
||||
// ndkVersion = "27.0.12077973"
|
||||
// ndkVersion flutter.ndkVersion
|
||||
compileSdkVersion 35
|
||||
// compileSdkVersion 35
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
@@ -54,9 +54,10 @@ android {
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 24 //flutter.minSdkVersion
|
||||
targetSdkVersion 34 //flutter.targetSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
@@ -84,8 +85,21 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
// implementation("com.google.android.material:material:<version>")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation "com.google.android.material:material:1.12.0"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version"))
|
||||
// implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
|
||||
}
|
||||
|
||||
// apply plugin: 'com.huawei.agconnect'
|
||||
// apply plugin: 'com.huawei.agconnect'
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
eachDependency { details ->
|
||||
if (details.requested.group == 'org.jetbrains.kotlin') {
|
||||
if (!details.requested.version.startsWith(rootProject.ext.kotlin_version)) {
|
||||
details.useVersion rootProject.ext.kotlin_version
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.ads.APPLICATION_ID"
|
||||
android:value="ca-app-pub-4781880856775334~7553757584"/>
|
||||
</application>
|
||||
|
||||
<!-- Provide required visibility configuration for API level 30 and above -->
|
||||
|
||||
@@ -3,4 +3,4 @@ package za.co.mzansiinnovationhub.mih
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
|
||||
class MainActivity: FlutterFragmentActivity() {
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '2.0.20'
|
||||
ext.kotlin_version = '2.1.21'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// classpath "com.android.tools.build:gradle:8.8.0"
|
||||
classpath "com.android.tools.build:gradle:8.8.1"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
// classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
||||
}
|
||||
@@ -25,9 +25,9 @@ rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
//subprojects {
|
||||
// project.evaluationDependsOn(':app')
|
||||
//}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -18,6 +18,7 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.1.21" apply false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user