Provide instructions for when using (TOML) version catalog and plugins syntax
PLEASE FIX
Not a good start!
Gradle version used: gradle-8.14.3-all
[versions]
agp = "8.13.0"
kotlin-android = "2.2.21"
objectbox = "5.0.1"
[libraries]
# ObjectBox
objectbox-kotlin = { group = "io.objectbox", name = "objectbox-kotlin", version.ref = "objectbox" }
[plugins]
objectboxPlugin = { id = "io.objectbox.objectbox-gradle-plugin", version.ref = "objectbox" }
settings.gradle.kts (project)
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
build.gradle.kts (project)
plugins {
# some other ...
alias(libs.plugins.objectboxPlugin) apply false
build.gradle.kts (:app)
plugins {
# some other ...
alias(libs.plugins.objectboxPlugin)
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'io.objectbox.objectbox-gradle-plugin', version: '5.0.1', apply: false] was not found in any of the following sources:
Using the plugins syntax requires some extra configuration. See the README "Gradle setup" section and look for "Using plugins syntax".
Using the plugins syntax requires some extra configuration. See the README "Gradle setup" section and look for "Using plugins syntax".
You are deadly wrong my gradle is perfect my project is large, with lots of libraries, objectbox = "5.0.1" version is not correctly published! Other objectbox versions are.
In you doc, please add the Gradle kotlin DSL setup, please and check - today in Android and kotlin way is to use libs.versions.toml that is default when making an Intellij and Android Studio project!
with entries the syntax above is correct and verified - you try it, see the error yourself, then go fix it, while you at it, fix the Docs!
Other object box versions seem to work!
[versions]
objectbox = "5.0.1"
[libraries]
# ObjectBox
objectbox-kotlin = { group = "io.objectbox", name = "objectbox-kotlin", version.ref = "objectbox" }
[plugins]
objectboxPlugin = { id = "io.objectbox.objectbox-gradle-plugin", version.ref = "objectbox" }
Afterthought: this is my first try to use your library and its becomming a bad experience ....
The problem was with Gradle Kotlin DSL !
Gradle is using for its search:
What Gradle is looking for: io.objectbox:io.objectbox.gradle.plugin:5.0.1
What it should be looking for: io.objectbox:objectbox-gradle-plugin:5.0.1
Let us Bypass Gradle Kotlin DSL
This is the fix for agp = "8.13.1" and more ...
[versions]
objectbox = "5.0.1"
[libraries]
objectbox-gradle-plugin = { group = "io.objectbox", name = "objectbox-gradle-plugin", version.ref = "objectbox" }
[plugins]
#objectbox = { id = "io.objectbox", version.ref = "objectbox" }
Then app.build.gradle.kts
buildscript {
dependencies {
classpath(libs.objectbox.gradle.plugin)
}
}
then
plugins {}
apply(plugin = "io.objectbox")
That is it!