-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Reflect #198
Reflect #198
Conversation
Cool, do you have a sense of the savings? and can you cherry-pick since I had rebased your earlier commit (so different hash)? |
Oh, I see it in the commit message. even better |
Yes, I missed that. After the rebase there are only 11K saved. Still worth it in terms of the simpler code :) |
This patch expands on the suggestion in ben-manes#110 (comment) Instead of the proposed numeric code the name of factory is used as the classname to instantiate using reflection. This reduces the class size with 21K bringing the jar size to 786K.
Yep, good call. Thanks again. :) |
I'm having an issue building with this change now. It looks like the imports are not being resolved, even though it should be in the same package.
|
I think this works: task compileNoDebug(type: JavaCompile) {
mustRunAfter tasks.compileJava
source = "${buildDir}/generated-sources/"
destinationDir = compileJava.destinationDir
options.debug = false
options.incremental = false
classpath = sourceSets.main.runtimeClasspath + sourceSets.main.output
} Or we can disable |
Okay, I have it all working nicely. I'll check in a fix with some cleanup when I get a chance. |
@jvassev It looks like the |
This implement the suggested fix in #110 using reflection.