Skip to content

Commit

Permalink
add gratatouille-core automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Feb 19, 2024
1 parent 9b82c10 commit 8ab380e
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ The `gradle-plugin` module should depend on the Gradle API and apply the `com.gr
```kotlin
// implementation/build.gradle.kts
plugins {
id("java-gradle-plugin")
id("com.gradleup.gratatouille.plugin").version("0.0.1-SNAPSHOT")
}

Expand All @@ -83,8 +84,6 @@ dependencies {
// This adds the wiring code to the main source set. No dependency is pulled
// in the plugin classpath.
gratatouille(project(":implementation"))
// Add the gradle API
implementation(gradleApi())
}

// Create your plugin as usual, see https://docs.gradle.org/current/userguide/java_gradle_plugin.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gratatouille.gradle

import com.gradleup.gratatouille.gradle.BuildConfig
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Copy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class GratatouilleImplementationPlugin : Plugin<Project> {
target.configurations.getByName("ksp").dependencies.add(
target.dependencies.create("${BuildConfig.group}:gratatouille-processor:${BuildConfig.version}")
)
target.configurations.getByName("implementation").dependencies.add(
target.dependencies.create("${BuildConfig.group}:gratatouille-core:${BuildConfig.version}")
)

target.extensions.getByName("ksp").apply {
this as KspExtension
Expand Down
1 change: 0 additions & 1 deletion sample-plugin/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
}

dependencies {
implementation(gradleApi())
gratatouille(project(":implementation"))
}

Expand Down
1 change: 0 additions & 1 deletion sample-plugin/implementation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ plugins {
}

dependencies {
implementation("com.gradleup.gratatouille:gratatouille-core")
implementation(libs.kotlinx.serialization.json)
}
1 change: 0 additions & 1 deletion test-plugin/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
}

dependencies {
implementation(gradleApi())
gratatouille(project(":implementation"))
}

Expand Down
1 change: 0 additions & 1 deletion test-plugin/implementation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {
}

dependencies {
implementation("com.gradleup.gratatouille:gratatouille-core")
implementation(libs.kotlinx.serialization.json)
}

0 comments on commit 8ab380e

Please sign in to comment.