-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2697 from square/jwilson.0806.kts
Convert builds to KTS
- Loading branch information
Showing
69 changed files
with
1,154 additions
and
1,101 deletions.
There are no files selected for viewing
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import java.io.InputStreamReader | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
dependencies { | ||
api(projects.shark.sharkAndroid) | ||
api(projects.objectWatcher.objectWatcherAndroidCore) | ||
api(projects.objectWatcher.objectWatcherAndroidAndroidx) | ||
api(projects.leakcanary.leakcanaryAndroidUtils) | ||
implementation(libs.kotlin.stdlib) | ||
|
||
// Optional dependency | ||
compileOnly(libs.androidX.work.runtime) | ||
compileOnly(libs.androidX.work.multiprocess) | ||
|
||
testImplementation(libs.assertjCore) | ||
testImplementation(libs.junit) | ||
testImplementation(libs.kotlin.reflect) | ||
testImplementation(libs.mockito) | ||
testImplementation(libs.mockitoKotlin) | ||
androidTestImplementation(libs.androidX.test.espresso) | ||
androidTestImplementation(libs.androidX.test.rules) | ||
androidTestImplementation(libs.androidX.test.runner) | ||
androidTestImplementation(libs.assertjCore) | ||
androidTestImplementation(projects.shark.sharkHprofTest) | ||
androidTestUtil(libs.androidX.test.orchestrator) | ||
} | ||
|
||
fun gitSha(): String { | ||
val process = ProcessBuilder("git", "rev-parse", "--short", "HEAD").start() | ||
return InputStreamReader(process.inputStream).readText().trim() | ||
} | ||
|
||
android { | ||
resourcePrefix = "leak_canary_" | ||
compileSdk = libs.versions.androidCompileSdk.get().toInt() | ||
defaultConfig { | ||
minSdk = libs.versions.androidMinSdk.get().toInt() | ||
// Avoid DeprecatedTargetSdkVersionDialog during UI tests | ||
targetSdk = libs.versions.androidCompileSdk.get().toInt() | ||
buildConfigField("String", "LIBRARY_VERSION", "\"${rootProject.property("VERSION_NAME")}\"") | ||
buildConfigField("String", "GIT_SHA", "\"${gitSha()}\"") | ||
consumerProguardFiles("consumer-proguard-rules.pro") | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
testInstrumentationRunnerArguments( | ||
mapOf( | ||
"clearPackageData" to "true", | ||
) | ||
) | ||
testOptions { | ||
execution = "ANDROIDX_TEST_ORCHESTRATOR" | ||
} | ||
} | ||
namespace = "com.squareup.leakcanary.core" | ||
testNamespace = "com.squareup.leakcanary.core.test" | ||
lint { | ||
checkOnly += "Interoperability" | ||
disable += "GoogleAppIndexingWarning" | ||
error += "ObsoleteSdkInt" | ||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
leakcanary/leakcanary-android-instrumentation/build.gradle
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.