group 'com.pichillilorenzo.flutter_inappbrowser' version '1.0-SNAPSHOT' buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.3.2' } } rootProject.allprojects { repositories { google() jcenter() } } apply plugin: 'com.android.library' android { compileSdkVersion 29 defaultConfig { minSdkVersion 17 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true consumerProguardFiles 'proguard-rules.pro' } lintOptions { disable 'InvalidPackage' } buildTypes { debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dependencies { implementation 'androidx.webkit:webkit:1.0.0' implementation 'androidx.browser:browser:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'com.squareup.okhttp3:mockwebserver:3.11.0' } } afterEvaluate { def containsEmbeddingDependencies = false for (def configuration : configurations.all) { for (def dependency : configuration.dependencies) { if (dependency.group == 'io.flutter' && dependency.name.startsWith('flutter_embedding') && dependency.isTransitive()) { containsEmbeddingDependencies = true break } } } if (!containsEmbeddingDependencies) { android { dependencies { def lifecycle_version = "1.1.1" compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version" compileOnly "android.arch.lifecycle:runtime:$lifecycle_version" } } } }