Skip to content
Open
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
13 changes: 8 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
root = true

[*.{kt,kts}]
disabled_rules = filename
max_line_length = off
insert_final_newline = true
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_java_class_count_to_use_import_on_demand = 999
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
insert_final_newline = true
max_line_length = off

ktlint_code_style = intellij_idea
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_filename = disabled
6 changes: 5 additions & 1 deletion .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on: [ push, workflow_dispatch ]
jobs:
semantic_library_workflow:
name: push
uses: krogerco/Shared-CI-Workflow-Android/.github/workflows/semantic_library_workflow.yml@v1.0.0
uses: krogerco/Shared-CI-Workflow-Android/.github/workflows/semantic_library_workflow.yml@v1.5.0
with:
java_version: '17'
ktlint_version: '-1'
test_command: 'test'
secrets:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy Documentation

on:
# Run any time code is pushed to main.
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
deploy-docs:
name: Publish Documentation
uses: krogerco/Shared-CI-Workflow-Android/.github/workflows/pages.yml@v1.3.0
with:
java_version: '17'
31 changes: 0 additions & 31 deletions .husky/_/husky.sh

This file was deleted.

5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit
npx --no-install commitlint --edit
27 changes: 24 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
### AUTOGENERATED KGP KOTLINTER HOOK START - DO NOT MODIFY ###
staged_files="$(git --no-pager diff --name-status --no-color --staged | awk '$1 != "D" && $NF ~ /\.kts|\.kt/ { print $NF }')"
if [ -z "$staged_files" ]; then
echo "No Kotlin files are staged."
exit 0
fi;

ktlint "**/src/**/*.kt" "!**/generated/**" --android --reporter=plain?group_by_file
echo "Running ktlint on the following staged files:"
echo "$staged_files"

auto_format_files=false
if [ "$auto_format_files" = true ] ; then
echo "auto-formatting staged files..."
./gradlew formatKotlinFiles -Pfiles="$staged_files"
fi

if ! ./gradlew checkKotlinFiles -Pfiles="$staged_files"; then
echo "pre-commit hook: Some files are either not properly formatted or could not be auto-formatted. Aborting commit."
exit 1
else
# Re-index any files that may have been corrected before committing
echo "$staged_files" | xargs git add
exit_code=0
fi
### AUTOGENERATED KGP KOTLINTER HOOK END ###
23 changes: 10 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
All notable changes to this project will be documented in this file.
`Cache-Android` adheres to [Semantic Versioning](https://semver.org/).

## main

### Added

### Breaking Changes

### Updated

### Fixed

## 3.1.0
- [feat] use kotlin 1.9.23
- [fix] remove kotlin serialization dependencies from android module
- [build] use convention plugins
- [chore] update sample app dependencies
## 3.0.0
- [feat!] renamed `CacheSerializer.decodeFromString(...)` to `CacheSerializer.decodeFromByteArray(...)`
- [feat] add moshi serialization implementation module
## 2.0.0
- [feat!] abstract serialization and add kotlin serialization implementation module
## 1.0.0

### Added

- Initial open source release.
16 changes: 10 additions & 6 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.kroger.gradle.config.junitVintage

/**
* MIT License
*
Expand All @@ -22,25 +24,27 @@
* SOFTWARE.
*/
plugins {
`android-library-module`
`release-module`
alias(libs.plugins.conventions.publishedAndroidLibrary)
}

android {
namespace = "com.kroger.cache.android"
}

koverReport {
defaults {
mergeWith("debug")
}
}

dependencies {
api(project(":cache"))
api(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.coroutines)

junitVintage()
testImplementation(project(":kotlinx"))
testImplementation(libs.jupiter.api)
testImplementation(libs.mockk)
testImplementation(libs.truth)
testRuntimeOnly(libs.jupiter.engine)

androidTestImplementation(libs.androidx.test.ext)
androidTestImplementation(libs.androidx.test.rules)
Expand Down
31 changes: 26 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.kroger.gradle.config.koverAllProjects

/**
* MIT License
*
Expand All @@ -22,12 +24,31 @@
* SOFTWARE.
*/
plugins {
id("org.jetbrains.dokka")
id("com.google.devtools.ksp") version "1.7.20-1.0.8" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.junit5) apply false
alias(libs.plugins.conventions.androidApplication) apply false
alias(libs.plugins.conventions.publishedAndroidLibrary) apply false
alias(libs.plugins.conventions.publishedKotlinLibrary) apply false
alias(libs.plugins.conventions.root)
alias(libs.plugins.dependencyAnalysis) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.gradleVersions) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.kapt) apply false
alias(libs.plugins.kotlinter) apply false
alias(libs.plugins.kover) apply true
alias(libs.plugins.ksp) apply false
alias(libs.plugins.mavenPublish) apply false
}

tasks {
register("clean", Delete::class) {
delete(rootProject.buildDir)
koverReport {
filters {
excludes {
packages("com.kroger.cache.sampleapp")
}
}
}

dependencies {
koverAllProjects(rootProject)
}
13 changes: 0 additions & 13 deletions buildSrc/build.gradle.kts

This file was deleted.

6 changes: 0 additions & 6 deletions buildSrc/settings.gradle.kts

This file was deleted.

32 changes: 0 additions & 32 deletions buildSrc/src/main/java/SdkVersions.kt

This file was deleted.

53 changes: 0 additions & 53 deletions buildSrc/src/main/java/android-library-module.gradle.kts

This file was deleted.

16 changes: 0 additions & 16 deletions buildSrc/src/main/java/java-library-module.gradle.kts

This file was deleted.

9 changes: 0 additions & 9 deletions buildSrc/src/main/java/release-module.gradle.kts

This file was deleted.

8 changes: 4 additions & 4 deletions cache/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.kroger.gradle.config.junit5

/**
* MIT License
*
Expand All @@ -22,16 +24,14 @@
* SOFTWARE.
*/
plugins {
`java-library-module`
`release-module`
alias(libs.plugins.conventions.publishedKotlinLibrary)
}

dependencies {
implementation(libs.kotlinx.coroutines)
api(libs.telemetry)

testImplementation(libs.jupiter.api)
junit5()
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.truth)
testRuntimeOnly(libs.jupiter.engine)
}
Loading
Loading