-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0883867
commit 012a701
Showing
18 changed files
with
118 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import io.embrace.gradle.Versions | ||
import io.gitlab.arturbosch.detekt.Detekt | ||
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("com.android.library") apply false | ||
id("kotlin-android") apply false | ||
id("io.gitlab.arturbosch.detekt") apply false | ||
} | ||
|
||
android { | ||
compileSdk = Versions.COMPILE_SDK | ||
|
||
defaultConfig { | ||
minSdk = Versions.MIN_SDK | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
lint { | ||
abortOnError = true | ||
warningsAsErrors = true | ||
checkAllWarnings = true | ||
checkReleaseBuilds = false // run on CI instead, speeds up release builds | ||
baseline = project.file("lint-baseline.xml") | ||
disable.addAll(mutableSetOf("GradleDependency", "NewerVersionAvailable")) | ||
} | ||
} | ||
|
||
dependencies { | ||
add("detektPlugins", "io.gitlab.arturbosch.detekt:detekt-formatting:${Versions.DETEKT}") | ||
} | ||
|
||
detekt { | ||
buildUponDefaultConfig = true | ||
autoCorrect = true | ||
config.from(project.files("${project.rootDir}/config/detekt/detekt.yml")) // overwrite default behaviour here | ||
baseline = | ||
project.file("${project.projectDir}/config/detekt/baseline.xml") // suppress pre-existing issues | ||
} | ||
|
||
project.tasks.withType(Detekt::class.java).configureEach { | ||
jvmTarget = "1.8" | ||
reports { | ||
html.required.set(true) | ||
xml.required.set(false) | ||
txt.required.set(true) | ||
sarif.required.set(false) | ||
md.required.set(false) | ||
} | ||
} | ||
|
||
project.tasks.withType(DetektCreateBaselineTask::class.java).configureEach { | ||
jvmTarget = "1.8" | ||
} | ||
|
||
project.tasks.withType(JavaCompile::class.java).configureEach { | ||
options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation")) | ||
} | ||
|
||
project.tasks.withType(KotlinCompile::class.java).configureEach { | ||
kotlinOptions { | ||
apiVersion = "1.8" | ||
languageVersion = "1.8" | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
freeCompilerArgs = freeCompilerArgs + "-Xexplicit-api=strict" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("embrace-defaults") | ||
id("embrace-prod-defaults") | ||
} | ||
|
||
description = "Embrace Android SDK: API" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("embrace-defaults") | ||
id("embrace-prod-defaults") | ||
} | ||
|
||
description = "Embrace Android SDK: Core" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("embrace-defaults") | ||
id("embrace-prod-defaults") | ||
} | ||
|
||
description = "Embrace Android SDK: Features" | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("embrace-defaults") | ||
id("embrace-prod-defaults") | ||
} | ||
|
||
description = "Embrace Android SDK: OkHttp3" | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("embrace-defaults") | ||
id("embrace-prod-defaults") | ||
id("com.google.devtools.ksp") | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,7 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("java-library") | ||
id("kotlin") | ||
id("embrace-test-defaults") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
android { | ||
namespace = "io.embrace.android.embracesdk.test.common" | ||
} | ||
|
||
project.tasks.withType(KotlinCompile::class.java).configureEach { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} | ||
} |
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,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<issues format="6" by="lint 8.5.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.5.1)" variant="all" version="8.5.1"> | ||
|
||
</issues> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# embrace-test-fakes | ||
|
||
Fake implementations that are used for writing unit/integration tests. |
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,11 @@ | ||
plugins { | ||
id("embrace-test-defaults") | ||
} | ||
|
||
android { | ||
namespace = "io.embrace.android.embracesdk.test.fakes" | ||
} | ||
|
||
dependencies { | ||
compileOnly(project(":embrace-android-core")) | ||
} |
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,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<issues format="6" by="lint 8.5.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.5.1)" variant="all" version="8.5.1"> | ||
|
||
</issues> |
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