-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompileOnly for the KGP in wire-gradle-plugin #3
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,15 @@ gradlePlugin { | |
dependencies { | ||
compileOnly(gradleApi()) | ||
compileOnly(libs.pluginz.android) | ||
compileOnly(libs.pluginz.kotlin) | ||
|
||
implementation(projects.wireCompiler) | ||
implementation(projects.wireKotlinGenerator) | ||
implementation(libs.swiftpoet) | ||
implementation(libs.pluginz.kotlin) | ||
|
||
testImplementation(libs.junit) | ||
testImplementation(libs.assertj) | ||
testImplementation(libs.pluginz.kotlin) | ||
testImplementation(projects.wireTestUtils) | ||
} | ||
|
||
|
@@ -55,6 +56,13 @@ tasks.withType<Test>().configureEach { | |
jvmArgs("--add-opens", "java.base/java.util=ALL-UNNAMED") | ||
dependsOn(installProtoJars) | ||
dependsOn(":wire-runtime:installLocally") | ||
dependsOn(":wire-java-generator:publishAllPublicationsToLocalMavenRepository") | ||
dependsOn(":wire-kotlin-generator:publishAllPublicationsToLocalMavenRepository") | ||
dependsOn(":wire-swift-generator:publishAllPublicationsToLocalMavenRepository") | ||
dependsOn(":wire-schema:publishAllPublicationsToLocalMavenRepository") | ||
dependsOn(":wire-grpc-client:publishAllPublicationsToLocalMavenRepository") | ||
dependsOn(":wire-compiler:publishAllPublicationsToLocalMavenRepository") | ||
dependsOn(":wire-gradle-plugin:publishAllPublicationsToLocalMavenRepository") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Circular dependency: wire-gradle-plugin depends on itself for tests |
||
} | ||
|
||
val test by tasks.getting(Test::class) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Removing buildCache configuration may affect test behavior. Ensure this is intentional. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
buildCache { | ||
local { | ||
directory = File(rootDir, "../.cache-include-paths-build-cache") | ||
} | ||
} | ||
|
||
pluginManagement { | ||
listOf(repositories, dependencyResolutionManagement.repositories).forEach { | ||
it.apply { | ||
mavenCentral() | ||
maven { | ||
url = uri(rootDir.resolve("../../../../../build/localMaven").absolutePath) | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files(rootDir.resolve("../../../../../gradle/libs.versions.toml").absolutePath)) | ||
} | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Removing the build cache configuration may affect caching behavior in tests. Ensure this is intentional and doesn't break any caching-related tests. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
buildCache { | ||
local { | ||
directory = File(rootDir, "../.cache-include-paths-build-cache") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Using a relative path for the build cache directory may cause issues if the project structure changes |
||
} | ||
} | ||
|
||
pluginManagement { | ||
listOf(repositories, dependencyResolutionManagement.repositories).forEach { | ||
it.apply { | ||
mavenCentral() | ||
maven { | ||
url = uri(rootDir.resolve("../../../../../build/localMaven").absolutePath) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Absolute path for local Maven repository reduces build portability |
||
} | ||
} | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files(rootDir.resolve("../../../../../gradle/libs.versions.toml").absolutePath)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Absolute path for version catalog file may cause issues in different environments |
||
} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
buildCache { | ||
local { | ||
directory = File(rootDir, "../.relocation-build-cache") | ||
} | ||
} | ||
|
||
pluginManagement { | ||
listOf(repositories, dependencyResolutionManagement.repositories).forEach { | ||
it.apply { | ||
mavenCentral() | ||
maven { | ||
url = uri(rootDir.resolve("../../../../../build/localMaven").absolutePath) | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files(rootDir.resolve("../../../../../gradle/libs.versions.toml").absolutePath)) | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
plugins { | ||
id 'application' | ||
id 'org.jetbrains.kotlin.jvm' | ||
id 'com.squareup.wire' | ||
id 'org.jetbrains.kotlin.jvm' version libs.versions.kotlin | ||
id 'com.squareup.wire' version "$wireVersion" | ||
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider using the same version declaration style for both plugins for consistency |
||
} | ||
|
||
// The code in this test project should be identical to | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Moving KGP to compileOnly may cause issues if the plugin relies on KGP classes at runtime