Skip to content

Commit

Permalink
Merge branch 'main' into sqlcipher-4.5.6
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 5, 2024
2 parents e8ec813 + 5a688b2 commit fe2e657
Show file tree
Hide file tree
Showing 204 changed files with 427 additions and 285 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
:OpenSSL:assembleArmeabi-v7a \
:OpenSSL:assembleX86 \
:OpenSSL:assembleX86_64
./gradlew :selekt-sqlite3:amalgamate
./gradlew :SQLite3:amalgamate
./gradlew assembleRelease
- name: 'Publish snapshot to OSSRH'
if: github.event_name == 'push'
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "selekt-sqlite3/src/main/external/sqlcipher"]
path = selekt-sqlite3/src/main/external/sqlcipher
[submodule "SQLite3/src/main/external/sqlcipher"]
path = SQLite3/src/main/external/sqlcipher
url = https://github.com/sqlcipher/sqlcipher.git
4 changes: 3 additions & 1 deletion AndroidCLI/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
4 changes: 3 additions & 1 deletion AndroidLibBenchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
Change Log
==========

## Version 0.22.0

Warning: This release decouples the choice of SQLite implementation from the main Android artifact, and requires an additional dependency declaration. Please refer to the [getting started](https://bloomberg.github.io/selekt/getting_started/#integration) guide.

### Fixes

* Use Kotlin's `Enum.entries` instead of `Enum.values()`.
* Decouple the choice of SQLite implementation from the main Android artifact.
* Publish a BOM.

### Dependencies

* Android SDK 34.
* Dokka 1.9.10.
* Gradle 8.6.
* Junit 5.10.1.
* Kotlin 1.9.22.
* Kotlin Coroutines 1.7.3.
* Mockito 5.10.0.
* Mockito-Kotlin 5.2.1.
* NDK 26.1.
* Room 2.6.1.

## Version 0.21.0

Warning: This release migrates from OpenSSL 1.1.1v to OpenSSL 3.1.2.
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Bloomberg Finance L.P.
Copyright 2020 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.
Expand Down
2 changes: 1 addition & 1 deletion OpenSSL/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
2 changes: 1 addition & 1 deletion selekt-sqlite3/CMakeLists.txt → SQLite3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Bloomberg Finance L.P.
# Copyright 2020 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.
Expand Down
27 changes: 2 additions & 25 deletions selekt-sqlite3/build.gradle.kts → SQLite3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Bloomberg Finance L.P.
# Copyright 2020 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.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
2 changes: 1 addition & 1 deletion selekt-sqlite3/sqlite3_jni.cpp → SQLite3/sqlite3_jni.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
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
2 changes: 1 addition & 1 deletion Selektric/native_mocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static jstring SystemProperties_get(
jstring keyJ,
jstring defJ
) {
auto key = env->GetStringUTFChars(keyJ, NULL);
auto key = env->GetStringUTFChars(keyJ, nullptr);
if (strcmp("ro.product.cpu.abilist", key)) {
env->ReleaseStringUTFChars(keyJ, key);
return env->NewStringUTF("arm64-v8a,armeabi-v7a");
Expand Down
39 changes: 19 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down Expand Up @@ -65,15 +65,13 @@ dependencies {
kover(projects.selektAndroid)
kover(projects.selektApi)
kover(projects.selektJava)
kover(projects.selektSqlite3Classes)
ktlint("com.pinterest:ktlint:${Versions.KTLINT}")
}

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 +154,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 +202,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
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand All @@ -15,7 +15,7 @@
*/

// TODO Move me.
val kotlinVersion = "1.9.10"
val kotlinVersion = "1.9.22"

plugins {
`kotlin-dsl`
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/JmhPlugin.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/SelektExtensions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand Down
18 changes: 9 additions & 9 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bloomberg Finance L.P.
* Copyright 2020 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.
Expand All @@ -25,27 +25,27 @@ enum class Versions(
ANDROID_GRADLE_PLUGIN("8.0.2", URL("https://developer.android.com/tools/revisions/gradle-plugin.html")),
ANDROID_LINT("30.0.2", URL("https://github.com/googlesamples/android-custom-lint-rules")),
ANDROID_NDK("26.1.10909125", URL("https://developer.android.com/ndk")),
ANDROID_SDK("33", URL("https://developer.android.com/sdk")),
ANDROID_SDK("34", URL("https://developer.android.com/sdk")),
ANDROIDX_LIVE_DATA("2.5.1", URL("https://developer.android.com/topic/libraries/architecture/livedata")),
ANDROIDX_ROOM("2.5.1", URL("https://developer.android.com/jetpack/androidx/releases/room")),
ANDROIDX_ROOM("2.6.1", URL("https://developer.android.com/jetpack/androidx/releases/room")),
CMAKE("3.22.1", URL("https://cmake.org")),
DETEKT("1.22.0", URL("https://github.com/arturbosch/detekt")),
DOKKA("1.8.20", URL("https://github.com/Kotlin/dokka")),
DOKKA("1.9.10", URL("https://github.com/Kotlin/dokka")),
GRADLE_DOWNLOAD_TASK_PLUGIN("5.4.0", URL("https://github.com/michel-kraemer/gradle-download-task")),
GRADLE_LICENSEE_PLUGIN("1.6.0", URL("https://github.com/cashapp/licensee")),
IDE_EXT_GRADLE_PLUGIN("1.1.7", URL("https://github.com/JetBrains/gradle-idea-ext-plugin")),
JMH("1.36", URL("https://openjdk.java.net/projects/code-tools/jmh/")),
JSR_305("3.0.2", URL("https://code.google.com/archive/p/jsr-305/")),
JUNIT4("4.13.2", URL("https://github.com/junit-team/junit4")),
JUNIT5("5.9.3", URL("https://junit.org/junit5/")),
KOTLIN("1.9.10", URL("https://github.com/JetBrains/kotlin")),
JUNIT5("5.10.1", URL("https://junit.org/junit5/")),
KOTLIN("1.9.22", URL("https://github.com/JetBrains/kotlin")),
KOTLIN_TEST(KOTLIN.version, URL("https://github.com/JetBrains/kotlin")),
KOTLINX_COROUTINES("1.7.2", URL("https://github.com/Kotlin/kotlinx.coroutines")),
KOTLINX_COROUTINES("1.7.3", URL("https://github.com/Kotlin/kotlinx.coroutines")),
KOTLINX_KOVER("0.7.2", URL("https://github.com/Kotlin/kotlinx-kover")),
KTLINT("0.45.2", URL("https://github.com/pinterest/ktlint")),
KTLINT_GRADLE_PLUGIN("11.5.0", URL("https://github.com/JLLeitschuh/ktlint-gradle")),
MOCKITO("5.4.0", URL("https://github.com/mockito/mockito")),
MOCKITO_KOTLIN("5.0.0", URL("https://github.com/mockito/mockito-kotlin")),
MOCKITO("5.10.0", URL("https://github.com/mockito/mockito")),
MOCKITO_KOTLIN("5.2.1", URL("https://github.com/mockito/mockito-kotlin")),
NEXUS_PLUGIN("1.3.0", URL("https://github.com/gradle-nexus/publish-plugin")),
QODANA_PLUGIN("0.1.12", URL("https://www.jetbrains.com/help/qodana/qodana-gradle-plugin.html")),
ROBOLECTRIC_ANDROID_ALL("12.1-robolectric-8229987", URL("https://github.com/robolectric/robolectric"));
Expand Down
Loading

0 comments on commit fe2e657

Please sign in to comment.