Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/android_pre_hook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.9.21'
ext.kotlin_version = '2.1.20'
ext.groupName = 'com.github.SchwarzIT'
repositories {
google()
Expand All @@ -11,9 +11,9 @@ buildscript {
}
}
dependencies {
classpath("com.android.library:com.android.library.gradle.plugin:8.1.4")
classpath("com.android.application:com.android.application.gradle.plugin:8.1.4")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21"
classpath("com.android.library:com.android.library.gradle.plugin:8.9.1")
classpath("com.android.application:com.android.application.gradle.plugin:8.9.1")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.20"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.5.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion crystal-map-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'java'

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
implementation "commons-codec:commons-codec:1.15"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
Expand Down
8 changes: 4 additions & 4 deletions crystal-map-couchbase-connector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ afterEvaluate {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
compileOnly 'com.couchbase.lite:couchbase-lite-android:2.1.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation project(path: ':crystal-map-api')
}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.schwarz.crystalcouchbaseconnector"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
26 changes: 11 additions & 15 deletions crystal-map-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ dependencies {
implementation 'com.squareup:kotlinpoet:1.15.0'
implementation 'com.squareup:kotlinpoet-metadata:1.15.0'
implementation project(path: ':crystal-map-api', configuration: 'default')
implementation 'org.apache.commons:commons-lang3:3.4'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.3"
implementation 'com.j2html:j2html:1.4.0'
implementation 'org.apache.commons:commons-lang3:3.17.0'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.18.3"
implementation 'com.j2html:j2html:1.6.0'
implementation "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.9.0"
testImplementation 'com.google.testing.compile:compile-testing:0.21.0'
testImplementation 'junit:junit:4.12'
testImplementation 'dev.zacsweers.kctfork:core:0.4.0'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'dev.zacsweers.kctfork:core:0.7.0'
testImplementation 'org.mockito:mockito-core:5.17.0'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2'
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
kapt "com.google.auto.service:auto-service:1.1.1"
compileOnly "com.google.auto.service:auto-service:1.1.1"
Expand Down Expand Up @@ -61,21 +62,16 @@ publishing {
}

jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.13"
}

jacocoTestReport {
group 'verification'
dependsOn 'test'

reports {

xml{
enabled true
}
html{
enabled false
}
xml.required = true
html.required = false
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.schwarz.crystalprocessor.meta

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.KotlinFeature
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.schwarz.crystalapi.deprecated.DeprecationType
import com.schwarz.crystalprocessor.model.deprecated.DeprecatedModel
Expand All @@ -18,7 +19,16 @@ class SchemaGenerator(path: String, val fileName: String) {

fun generate() {
path.mkdirs()
val mapper = ObjectMapper().registerModule(KotlinModule())
val mapper = ObjectMapper().registerModule(
KotlinModule.Builder()
.withReflectionCacheSize(512)
.configure(KotlinFeature.NullToEmptyCollection, false)
.configure(KotlinFeature.NullToEmptyMap, false)
.configure(KotlinFeature.NullIsSameAsDefault, false)
.configure(KotlinFeature.SingletonSupport, false)
.configure(KotlinFeature.StrictNullChecks, false)
.build()
)
File(path, fileName).writeText(mapper.writeValueAsString(jsonEntitySegments.values))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class CblBaseFieldHolder(val dbField: String, private val mField: Field
get() = mField.readonly

val constantName: String
get() = ConversionUtil.convertCamelToUnderscore(dbField).toUpperCase()
get() = ConversionUtil.convertCamelToUnderscore(dbField).uppercase()

val defaultValue: String
get() = mField.defaultValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ fun Element.getTypeConverterInterface(): KmType? {
private val typeConverterKmClass = ITypeConverter::class.java.getAnnotation(Metadata::class.java).toKmClass()

private fun Metadata.toKmClass() =
(KotlinClassMetadata.read(this) as KotlinClassMetadata.Class).kmClass
(KotlinClassMetadata.readStrict(this) as KotlinClassMetadata.Class).kmClass
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

public class JavaAnnotationUtil {

public static Entity createReadOnlyCopyOfEntityAnnotation(final Entity source)
{
Entity annotation = new Entity()
{
public static Entity createReadOnlyCopyOfEntityAnnotation(final Entity source) {

return new Entity() {

@Override
public Class<? extends Annotation> annotationType() {
Expand All @@ -36,8 +35,6 @@ public String database() {
return source.database();
}
};

return annotation;
}

}
Loading