-
Notifications
You must be signed in to change notification settings - Fork 34
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
[WIP] Read android sources #291
base: main
Are you sure you want to change the base?
Conversation
@@ -74,15 +76,15 @@ java { | |||
} | |||
|
|||
tasks.withType<JavaCompile>().configureEach { | |||
options.release.set(8) | |||
options.release.set(11) |
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.
So we can add AGP and get sourcesets defined by the plugin. AGP can't compile against java 8. Would need to rework this to probably use reflection for android projects if we don't want to bump version/include AGP.
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.
Indeed let's not bump the required version, as that affects all our users, and there's a lot of code using Java 8 that still needs to be converted. For that same reason we still support Gradle 4.10, as much as we're aware of benefits to future versions.
|
||
val variants = subproject.extensions.findByType(BaseExtension::class.java)?.variants ?: return Stream.empty<SourceFile>() to 0 | ||
|
||
val sources = variants.map { variant -> |
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.
Each gradle module can have multiple variants, and each variant can have multiple sourcesets. variant.sourceSets
is not a list of org.gradle.api.tasks.SourceSet
's, so the existing parsing code can't be shared. It is a list of SourceProvider's
This is a very rough WIP of attempting to read sources from Android modules.