Skip to content

Commit

Permalink
Change dependency of 'faker modules' on 'core' to compileOnly
Browse files Browse the repository at this point in the history
Need to find a way to make compileOnly work, else each faker module will
contain everything from core, including shadowed jackson, all the .yml
dictionaries, etc., etc.
  • Loading branch information
serpro69 committed Mar 23, 2024
1 parent 637498b commit 01f7d37
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions buildSrc/src/main/kotlin/faker-provider-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ plugins {
}

dependencies {
val implementation by configurations
implementation(project(":core"))
val compileOnly by configurations
val testImplementation by configurations
// In order to use an additional fake data provider,
// core faker needs to be on the classpath.
// Don't add it as transitive dependency to each faker provider
compileOnly(project(":core"))
// we need implementation dependency for tests to be able to access 'core' functionality
testImplementation(project(":core"))
}

// since we're adding :core as implementation dependency,
// we also need to make sure ShadowJar tasks depend on core having been built
// we have a dependency on :core,
// hence we also need to make sure ShadowJar tasks depend on core having been built
val shadowJar by tasks.getting(ShadowJar::class) {
dependsOn(":core:assemble")
}
Expand Down

0 comments on commit 01f7d37

Please sign in to comment.