Gradle platform BOM set version selectively

117 Views Asked by At

I create Bom In this BOM constraints many dependency (for example io.github.microutils:kotlin-logging, ch.qos.logback:logback-classic) When i add this BOM to my application and remove version (kotlin-logging, logback-classic) i have error

Could not find io.github.microutils:kotlin-logging:.

But for dependency logback-classic gradle resolve version.

How to reproduce:

  1. clone exemple project
  2. execute in module bom task publishToMavenLocal
  3. remove version kotlin-logging
  4. try build module application

how should i declare dependency not to specify version ?

1

There are 1 best solutions below

0
On

i use runtime for declar dependency. After Read https://docs.gradle.org/6.7.1/userguide/java_platform_plugin.html#sec:java_platform_separation i change on api, and it worked