Gradle internal project dependency with classifier syntax help

Hi there. I need some help with syntax. I have multi-project build

  • service
  • common
  • integration-tests
  • others

Service module has plugins ‘java’ and ‘org.springframework.boot’ also i`ve define this properties for task

jar {
    enabled = true
    archiveClassifier = 'classes'

as a result in ‘libs’ folder I have 2 jars
service-1.0-SNAPSHOT - fat jar with all dependencies
service-1.0-SNAPSHOT-classes - built by jar task

I want to add ‘service-1.0-SNAPSHOT-classes’ to my ‘integration-tests’ module

I tried this

    implementation project(':service:+:classes')
dependencies {
    // ... other dependencies
    compile files('libs/<your jar's name here>')

and this

compile fileTree(dir: ‘lib’, include: ‘*.jar’)