Skip to content
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

Wire proto sources/outputs/etc through ProtoSourceSet #632

Closed
wants to merge 21 commits into from

Conversation

rougsig
Copy link
Collaborator

@rougsig rougsig commented Oct 29, 2022

No description provided.

@rougsig rougsig changed the title Wire proto sources/outputs/etc through Proto SourceSet Wire proto sources/outputs/etc through ProtoSourceSet Oct 29, 2022
@rougsig rougsig force-pushed the feat/proto-sourceset branch 3 times, most recently from bd42d4c to 83dbd91 Compare November 1, 2022 17:03
project,
isTest,
protoDir,
protoDir.absolutePath.replace(project.rootDir.absolutePath, "").contains("build")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do better

project,
isTest,
protoDir,
protoDir.absolutePath.replace(project.rootDir.absolutePath, "").contains("build")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do better

project,
isTest,
outputDir,
outputDir.absolutePath.replace(project.rootDir.absolutePath, "").contains("build")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do better

private void configureAndroidKotlinCompileTasks(BaseVariant variant, ProtoSourceSet protoSourceSet) {
project.plugins.withId("org.jetbrains.kotlin.android") {
project.afterEvaluate {
String compileKotlinTaskName = Utils.getKotlinAndroidCompileTaskName(project, variant.name)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getKotlinAndroidCompileTaskName can be moved to ProtoSourceSet

Otherwise, gradle throw ClassNotFound exception
.withPluginClasspath()
.withGradleVersion(gradleVersion)
.build()
BuildResult result = ProtobufPluginTestHelper.getGradleRunner(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to separate PR

// https://github.com/gradle/gradle/issues/6862
//.withDebug(true)
.build()
BuildResult result = ProtobufPluginTestHelper.getGradleRunner(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to separate PR

import org.gradle.language.jvm.tasks.ProcessResources

@CompileDynamic
class AndroidExt {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment: Temporarily hack. TODO: Move all AndroidExt to AndroidProtobufPlugin

@rougsig rougsig closed this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant