Skip to content

Compatibility of ObjectBox with latest Kotlin Jetpack Compose projects using .toml dependencies #1217

@Sanavenkatesh

Description

@Sanavenkatesh

I’m trying to use ObjectBox in a Kotlin Jetpack Compose project that uses the new Gradle Version Catalog (libs.versions.toml) for dependency management.

in gradle/libs.versions.toml added these

[versions]
objectbox = "4.3.1"

[libraries]
objectbox-android = { module = "io.objectbox:objectbox-android", version.ref = "objectbox" }

[plugins]
objectbox = { id = "io.objectbox", version.ref = "objectbox" }

in build.gradle.kts added these

plugins {
    alias(libs.plugins.objectbox)
}

dependencies {
    implementation(libs.objectbox.android)
}

But this setup doesn’t work — I’m getting build errors when trying to sync/compile.

Plugin [id: 'io.objectbox', version: '4.3.1'] was not found in any of the following sources: 
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace) 
- Included Builds (No included builds contain this plugin) 
- Plugin Repositories (could not resolve plugin artifact 'io.objectbox:io.objectbox.gradle.plugin:4.3.1') 
Searched in the following repositories: 
Google
MavenRepo 
Gradle Central Plugin Repository
  1. Does ObjectBox currently support projects that use .toml for dependency declarations?
  2. If yes, is there any special configuration needed for build.gradle.kts or settings.gradle.kts?
  3. Is there any documentation for this?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions