Skip to content

Commit

Permalink
Separate sqlite3 Java classes subproject.
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth J. Shackleton <[email protected]>
  • Loading branch information
kennethshackleton committed Feb 4, 2024
1 parent 561f635 commit c53cf1a
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 26 deletions.
2 changes: 1 addition & 1 deletion selekt-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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: 1 addition & 1 deletion selekt-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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
42 changes: 42 additions & 0 deletions selekt-sqlite3-classes/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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
}

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 c53cf1a

Please sign in to comment.