Skip to content

Commit

Permalink
Merge branch 'main' into prepare-0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethshackleton authored Jan 9, 2023
2 parents dec5884 + f395966 commit d6167ca
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 195 deletions.
11 changes: 2 additions & 9 deletions AndroidLibBenchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ android {
arrayOf("androidTest").forEach {
sourceSets[it].java.srcDir("src/$it/kotlin")
}
configurations.all {
resolutionStrategy {
// FIXME Please remove as soon as the project compiles without.
force("org.jetbrains.kotlin:kotlin-stdlib:${Versions.KOTLIN}")
force("org.jetbrains.kotlin:kotlin-stdlib-common:${Versions.KOTLIN}")
}
}
lintOptions {
disable("OldTargetApi")
}
Expand All @@ -72,6 +65,6 @@ dependencies {
androidTestImplementation(androidX("benchmark", "junit4", "1.0.0"))
androidTestImplementation(kotlin("test", Versions.KOTLIN.version))
androidTestImplementation(kotlin("test-junit", Versions.KOTLIN.version))
androidTestImplementation(kotlinX("coroutines-core"))
androidTestImplementation(kotlinX("coroutines-jdk8"))
androidTestImplementation(kotlinX("coroutines-core", Versions.KOTLINX_COROUTINES.version))
testImplementation(kotlinX("coroutines-core", Versions.KOTLINX_COROUTINES.version))
}
1 change: 1 addition & 0 deletions OpenSSL/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ repositories {

plugins {
base
id("de.undercouch.download") version Versions.GRADLE_DOWNLOAD_TASK_PLUGIN.version
}

fun Project.openSslVersion() = arrayOf(
Expand Down
43 changes: 40 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

import com.android.build.gradle.TestedExtension
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import java.net.URL
Expand Down Expand Up @@ -66,14 +67,48 @@ subprojects {
group = rootProject.group
version = rootProject.version
apply {
plugin("selekt")
plugin("io.gitlab.arturbosch.detekt")
}
plugins.withType<JavaPlugin>().configureEach {
dependencies {
"implementation"(platform(kotlinX("coroutines-bom", version = Versions.KOTLINX_COROUTINES.version)))
tasks.withType<Jar>().configureEach {
metaInf {
from("$rootDir/LICENSE")
}
}
}
listOf("java", "com.android.library").forEach {
plugins.withId(it) {
dependencies {
configurations.getByName("compileOnly").apply {
add(name, "com.google.code.findbugs:jsr305:[2.0.2, ${Versions.JSR_305}]")
}
configurations.getByName("implementation").apply {
platform(kotlinX("coroutines-bom", version = Versions.KOTLINX_COROUTINES.version))
}
configurations.getByName("testImplementation") {
add(name, kotlin("test", Versions.KOTLIN_TEST.version))
add(name, kotlinX("coroutines-core", version = Versions.KOTLINX_COROUTINES.version))
add(name, "org.mockito:mockito-core:${Versions.MOCKITO}")
add(name, "org.mockito.kotlin:mockito-kotlin:${Versions.MOCKITO_KOTLIN}")
}
}
}
}
listOf("com.android.application", "com.android.library").forEach {
plugins.withId(it) {
extensions.getByType<TestedExtension>().apply {
lintOptions {
isWarningsAsErrors = true
}
testOptions {
unitTests.isIncludeAndroidResources = true
}
}
}
}
tasks.withType<Test>().configureEach {
systemProperty("com.bloomberg.selekt.lib.can_use_embedded", true)
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
Expand All @@ -91,6 +126,8 @@ subprojects {
}
useJUnitPlatform()
mapOf(
"junit.jupiter.execution.parallel.enabled" to true,
"junit.jupiter.execution.parallel.mode.default" to "concurrent",
"junit.jupiter.execution.timeout.lifecycle.method.default" to "60s",
"junit.jupiter.execution.timeout.mode" to "disabled_on_debug",
"junit.jupiter.execution.timeout.testable.method.default" to "60s"
Expand Down
6 changes: 0 additions & 6 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ repositories {

gradlePlugin {
plugins {
create("Selekt Plugin") {
id = "selekt"
implementationClass = "SelektPlugin"
}
create("Bloomberg JMH Plugin") {
id = "bb-jmh"
implementationClass = "JmhPlugin"
Expand All @@ -41,8 +37,6 @@ gradlePlugin {
}

dependencies {
compileOnly(gradleApi())
implementation(kotlin("gradle-plugin", version = kotlinVersion))
implementation("com.android.tools.build:gradle:7.3.1")
implementation("de.undercouch:gradle-download-task:5.3.0")
}
23 changes: 0 additions & 23 deletions buildSrc/src/main/kotlin/Plugins.kt

This file was deleted.

33 changes: 0 additions & 33 deletions buildSrc/src/main/kotlin/Projects.kt

This file was deleted.

93 changes: 0 additions & 93 deletions buildSrc/src/main/kotlin/SelektPlugin.kt

This file was deleted.

25 changes: 0 additions & 25 deletions buildSrc/src/main/kotlin/Tasks.kt

This file was deleted.

2 changes: 1 addition & 1 deletion selekt-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ dependencies {
implementation(projects.selektAndroidSqlcipher)
implementation(projects.selektJava)
implementation(projects.selektSqlite3)
kaptTest(androidX("room", "compiler", Versions.ANDROIDX_ROOM.version))
testImplementation(androidX("lifecycle", "livedata-ktx", Versions.ANDROIDX_LIVE_DATA.version))
testImplementation(androidX("room", "runtime", Versions.ANDROIDX_ROOM.version))
testImplementation(androidX("room", "ktx", Versions.ANDROIDX_ROOM.version))
testImplementation("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT5}")
testRuntimeOnly("org.robolectric:android-all:${Versions.ROBOLECTRIC_ANDROID_ALL}")
kaptTest(androidX("room", "compiler", Versions.ANDROIDX_ROOM.version))
}

tasks.withType<Test>().configureEach {
Expand Down
3 changes: 1 addition & 2 deletions selekt-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ val integrationTestRuntimeOnly: Configuration by configurations.getting {
dependencies {
implementation(projects.selektApi)
implementation(projects.selektSqlite3)
jmhImplementation(kotlinX("coroutines-core"))
jmhImplementation(kotlinX("coroutines-jdk8"))
jmhImplementation(kotlinX("coroutines-core", version = Versions.KOTLINX_COROUTINES.version))
}

publishing {
Expand Down

0 comments on commit d6167ca

Please sign in to comment.