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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: "Setup JDK"
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: 'gradle'
- name: "Build & Test"
run: ./gradlew clean assembleDebug testDebugUnitTest
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
jobs:
publish:
name: "Release"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: "Setup JDK"
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: 'gradle'
- name: "Build & Release"
run: ./gradlew clean library:assembleRelease androidJavaDocJar androidSourcesJar generatePomFileForNexusPublication publishNexusPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository
Expand Down
4 changes: 2 additions & 2 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ dependencies {

android {
namespace 'com.devbrackets.android.datastoredemo'
compileSdk 35
compileSdk = 36

defaultConfig {
applicationId "com.devbrackets.android.datastoredemo"
minSdkVersion 23
targetSdkVersion 35
targetSdkVersion 36
versionCode 1
versionName "1.0.0"
}
Expand Down
28 changes: 14 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
[versions]
activityCompose = "1.9.3"
androidGradlePlugin = "8.7.3"
appcompat = "1.7.0"
coreKtx = "1.15.0"
datastorePreferences = "1.1.1"
activityCompose = "1.10.1"
androidGradlePlugin = "8.12.0"
appcompat = "1.7.1"
coreKtx = "1.17.0"
datastorePreferences = "1.1.7"
junit = "4.13.2"
kotlin = "2.0.20"
material = "1.7.6"
navigationCompose = "2.8.5"
nexusPublish = "1.1.0"
robolectric = "4.13"
composeUi = "1.7.6"
kotlin = "2.2.10"
navigationCompose = "2.9.3"
nexusPublish = "2.0.0"
robolectric = "4.15.1"
composeUi = "1.9.0"

[libraries]
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
Expand All @@ -21,8 +20,8 @@ datastore-preferences = { module = "androidx.datastore:datastore-preferences", v
junit = { module = "junit:junit", version.ref = "junit" }
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-stdlib-jdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" }
material = { module = "androidx.compose.material:material", version.ref = "material" }
material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "material" }
material = { module = "androidx.compose.material:material", version = "1.9.0" }
material-icons-core = { module = "androidx.compose.material:material-icons-core", version = "1.7.8" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
ui = { module = "androidx.compose.ui:ui", version.ref = "composeUi" }
Expand All @@ -35,4 +34,5 @@ android-library = { id = "com.android.library", version.ref = "androidGradlePlug
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexusPublish" }

maven-publish = { id = "maven-publish" }
signing = { id = "signing" }
11 changes: 5 additions & 6 deletions gradle/release/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

apply plugin: "maven-publish"
apply plugin: "signing"

task androidJavaDoc(type: Javadoc) {
tasks.register('androidJavaDoc', Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
options.encoding "UTF-8"
Expand All @@ -12,12 +9,13 @@ task androidJavaDoc(type: Javadoc) {
failOnError false
}

task androidJavaDocJar(type: Jar, dependsOn: androidJavaDoc) {
tasks.register('androidJavaDocJar', Jar) {
dependsOn androidJavaDoc
archiveClassifier.set('javadoc')
from androidJavaDoc.destinationDir
}

task androidSourcesJar(type: Jar) {
tasks.register('androidSourcesJar', Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
Expand All @@ -26,6 +24,7 @@ task androidSourcesJar(type: Jar) {
* Helper to add dependencies to the POM node. This is needed during manual construction
* of the dependencies block
*/
@SuppressWarnings('UnnecessaryQualifiedReference')
static def addPomDependency(groovy.util.Node dependenciesNode, Dependency dependency, String dependencyScope) {
// Ignore incomplete dependencies
if (dependency.name == null || dependency.name == 'unspecified' || dependency.group == null || dependency.version == null) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 4 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
alias libs.plugins.android.library
alias libs.plugins.kotlin.android
alias libs.plugins.maven.publish
alias libs.plugins.signing
}

afterEvaluate {
Expand All @@ -16,13 +18,13 @@ dependencies {
}

android {
compileSdk 35
compileSdk = 36

namespace 'com.devbrackets.android.datastore'

defaultConfig {
minSdkVersion 23
targetSdkVersion 35
targetSdkVersion 36
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlin.reflect.KClass
*/
class EnumValueConverter<E: Enum<E>, T: E?>(
private val enumClass: KClass<E>,
private val errorHandler: ErrorHandler<E, T> = DefaultErrorHandler<E,T>()
private val errorHandler: ErrorHandler<E, T> = DefaultErrorHandler()
): ValueConverter<T, String?> {
override fun toConverted(originalValue: T): String? {
return originalValue?.name
Expand Down
3 changes: 1 addition & 2 deletions libraryInfo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ GROUP_ID = com.devbrackets.android

VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_PATCH = 0
VERSION_PRE_RELEASE = preview01
VERSION_PATCH = 0