Created
September 6, 2019 07:17
-
-
Save quickbirdstudios-eng/abd7fbaff813d72096c39dbeeff0a346 to your computer and use it in GitHub Desktop.
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
// BluesquarePlugin.kt | |
open class BluesquarePlugin : Plugin<Project> { | |
override fun apply(project: Project) { | |
project.configureAndroid() | |
} | |
} | |
// Android.kt | |
internal fun Project.configureAndroid() = this.extensions.getByType<AndroidBaseExtension>().run { | |
compileSdkVersion(28) | |
defaultConfig { | |
minSdkVersion(21) | |
targetSdkVersion(28) | |
versionCode = 2 | |
versionName = "1.0.1" | |
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
getByName("release") { | |
isMinifyEnabled = false | |
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") | |
} | |
getByName("debug") { | |
isTestCoverageEnabled = true | |
} | |
} | |
packagingOptions { | |
exclude("META-INF/NOTICE.txt") | |
// ... | |
} | |
compileOptions { | |
sourceCompatibility = JavaVersion.VERSION_1_8 | |
targetCompatibility = JavaVersion.VERSION_1_8 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment