Skip to content

Commit

Permalink
Merge pull request #497 from kennethshackleton/sqlite3-classes
Browse files Browse the repository at this point in the history
Separate sqlite3 Java classes subproject.
  • Loading branch information
kennethshackleton authored Feb 4, 2024
2 parents 561f635 + 8a77ed6 commit 68619e6
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 49 deletions.
2 changes: 2 additions & 0 deletions AndroidCLI/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

repositories {
Expand Down
2 changes: 2 additions & 0 deletions AndroidLibBenchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ plugins {
id("com.android.library")
id("kotlin-android")
id("androidx.benchmark") version Versions.ANDROID_BENCHMARK.version
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

repositories {
Expand Down
4 changes: 0 additions & 4 deletions Selektric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import java.util.Locale
import java.nio.file.Files
import java.nio.file.Paths

repositories {
mavenCentral()
}

plugins {
base
}
Expand Down
36 changes: 17 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ dependencies {
subprojects {
group = rootProject.group
version = rootProject.version
apply {
plugin("io.gitlab.arturbosch.detekt")
}
plugins.withType<JavaPlugin>().configureEach {
tasks.withType<Jar>().configureEach {
metaInf {
Expand Down Expand Up @@ -156,14 +153,16 @@ subprojects {
systemProperty(it.key, it.value)
}
}
configure<DetektExtension> {
toolVersion = Versions.DETEKT.version
source = files("src")
config = files("${rootProject.projectDir}/config/detekt/config.yml")
buildUponDefaultConfig = true
parallel = false
debug = false
ignoreFailures = false
plugins.withId("io.gitlab.arturbosch.detekt") {
configure<DetektExtension> {
toolVersion = Versions.DETEKT.version
source = files("src")
config = files("${rootProject.projectDir}/config/detekt/config.yml")
buildUponDefaultConfig = true
parallel = false
debug = false
ignoreFailures = false
}
}
tasks.withType<Detekt>().configureEach {
exclude("**/res/**")
Expand Down Expand Up @@ -202,14 +201,13 @@ subprojects {
}

allprojects {
apply {
plugin("org.jlleitschuh.gradle.ktlint")
}
configure<KtlintExtension> {
version.set(Versions.KTLINT.version)
disabledRules.set(setOf("import-ordering", "indent", "wrapping"))
reporters {
reporter(ReporterType.HTML)
plugins.withId("org.jlleitschuh.gradle.ktlint") {
configure<KtlintExtension> {
version.set(Versions.KTLINT.version)
disabledRules.set(setOf("import-ordering", "indent", "wrapping"))
reporters {
reporter(ReporterType.HTML)
}
}
}
tasks.withType<GenerateReportsTask>().configureEach {
Expand Down
2 changes: 2 additions & 0 deletions selekt-android-lint/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ plugins {
kotlin("jvm")
`maven-publish`
signing
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

java {
Expand Down
1 change: 1 addition & 0 deletions selekt-android-sqlcipher/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ plugins {
id("com.android.library")
`maven-publish`
signing
id("io.gitlab.arturbosch.detekt")
}

repositories {
Expand Down
4 changes: 3 additions & 1 deletion selekt-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ plugins {
`maven-publish`
signing
id("org.jetbrains.kotlinx.kover")
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

repositories {
Expand Down Expand Up @@ -66,7 +68,7 @@ dependencies {
compileOnly(androidX("room", "runtime", Versions.ANDROIDX_ROOM.version))
implementation(projects.selektAndroidSqlcipher)
implementation(projects.selektJava)
implementation(projects.selektSqlite3)
implementation(projects.selektSqlite3Classes)
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))
Expand Down
2 changes: 2 additions & 0 deletions selekt-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ plugins {
`maven-publish`
signing
id("org.jetbrains.kotlinx.kover")
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

java {
Expand Down
4 changes: 3 additions & 1 deletion selekt-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ plugins {
`maven-publish`
signing
id("bb-jmh")
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

disableKotlinCompilerAssertions()
Expand All @@ -57,7 +59,7 @@ val integrationTestRuntimeOnly: Configuration by configurations.getting {

dependencies {
implementation(projects.selektApi)
implementation(projects.selektSqlite3)
implementation(projects.selektSqlite3Classes)
jmhImplementation(kotlinX("coroutines-core", version = Versions.KOTLINX_COROUTINES.version))
}

Expand Down
44 changes: 44 additions & 0 deletions selekt-sqlite3-classes/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright 2024 Bloomberg Finance L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

repositories {
mavenCentral()
}

plugins {
kotlin("jvm")
`maven-publish`
signing
id("io.gitlab.arturbosch.detekt")
id("org.jlleitschuh.gradle.ktlint")
}

disableKotlinCompilerAssertions()

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications.register<MavenPublication>("main") {
from(components.getByName("java"))
pom {
commonInitialisation(project)
description.set("Selekt Java SQLite interface library.")
}
}
}
25 changes: 1 addition & 24 deletions selekt-sqlite3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@ import java.nio.file.Files
import java.nio.file.Paths
import java.util.Locale

repositories {
mavenCentral()
}

plugins {
kotlin("jvm")
`maven-publish`
signing
base
}

val cFlags = arrayOf(
Expand Down Expand Up @@ -64,23 +58,6 @@ val cFlags = arrayOf(
"-DSQLITE_USE_URI=1"
)

disableKotlinCompilerAssertions()

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications.register<MavenPublication>("main") {
from(components.getByName("java"))
pom {
commonInitialisation(project)
description.set("Selekt Java SQLite interface library.")
}
}
}

tasks.register<Exec>("configureSqlCipher") {
workingDir = File("$projectDir/src/main/external/sqlcipher")
commandLine("./configure")
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ include(":selekt-android-sqlcipher")
include(":selekt-api")
include(":selekt-java")
include(":selekt-sqlite3")
include(":selekt-sqlite3-classes")

pluginManagement {
repositories {
Expand Down

0 comments on commit 68619e6

Please sign in to comment.