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
@rougsig rougsig force-pushed the feat/proto-sourceset branch from 293f152 to 4990241 Compare November 6, 2022 14:15
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

@rougsig rougsig force-pushed the feat/proto-sourceset branch from 3080003 to 3196f30 Compare November 6, 2022 16:03
@rougsig rougsig force-pushed the feat/proto-sourceset branch from 3196f30 to 7e4542a Compare November 6, 2022 16:03
Otherwise, gradle throw ClassNotFound exception
@rougsig rougsig force-pushed the feat/proto-sourceset branch from 8a1ef8d to f100c02 Compare November 6, 2022 16:24
.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