-
Notifications
You must be signed in to change notification settings - Fork 280
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
Add a sub-project for the common sources. #1155
base: master
Are you sure you want to change the base?
Conversation
Oh yeah, also rationalised the JUnit suite classes. Dropped the OpenJDK 7 one and merged the remainder together as we only use suites on OpenJDK. |
Ugh, I forgot to test the source jar and Javadoc tasks, which are failing in CI... I'll convert this to a draft until I fix them, but if you feel like commenting on the general shape of the change, that would be great. |
shadow might help here. It's already being used in |
Thanks, will do! |
ConscryptJava7Suite is obsolete, and we no longer use suites for anything but OpenJDK so merge ConscryptSuite into ConscryptOpenJdkSuite. Ultimately I aim to stop using suites. This is part of google#1155 but splitting it out here to simplify that change.
ConscryptJava7Suite is obsolete, and we no longer use suites for anything but OpenJDK so merge ConscryptSuite into ConscryptOpenJdkSuite. Ultimately I aim to stop using suites. This is part of #1155 but splitting it out here to simplify that change.
Puts the common sources in an explicit Gradle sub-project rather than just referring to them from multiple sourceSets. Pro: Project now loads cleanly in Studio with no duplicate source root warnings and Studio can follow cross-refs between all sub-projects. Pro: Also tidied up the dependencies to the constants build. Hopefully we can now tidy that build up further. Con: Had to add a whole new set of stubs (platform-stub) for Platform.java due to circular dependency... All of the code in common/ expects to be compiled against the current platform's Platform.java but all of the Platform.java's also expect to be compiled against the common code. Pro: Adding platform-stub allows us to remove the platformJar stuff from the OpenJDK build. Turns out this was just a hack to allow android-platform to build on OpenJDK so compiling against a stub is cleaner. Con: the common build's processTestResources task seems to try and copy all the resources twice causing an error. Added a hacky workaround for now. Major con: The AARs built by the Android build do not contain classes from the common sources. I've tried multiple ways of expressing the dependency and got nowhere so advice would be appreciated.
Still various Javadoc issues remain but they existed before this PR.
When specified in a defaultConfig block it ends up setting the module version too.....
Was using a no-longer-needed 3P plugin which doesn't work correctly with the latest AGP. Now is at least publishing an AAR even though it doesn't contain the common classes.
1. Remove the implementation dependency from :conscrypt-android to :conscrypt-common as that ends up exposing conscrypt-common as a dependency in the POM file. 2. Just copy the actual class files from the :conscrypt-common output into the :conscrypt-android build directory before the AAR is built.
Puts the common sources in an explicit Gradle sub-project rather than just referring to them from multiple sourceSets.
Pro: Project now loads cleanly in Studio with no duplicate source root warnings and Studio can follow cross-refs between all sub-projects.
Pro: Also tidied up the dependencies to the constants build. Hopefully we can now tidy that build up further.
Con: Had to add a whole new set of stubs (platform-stub) for Platform.java due to circular dependency... All of the code in common/ expects to be compiled against the current platform's Platform.java but all of the Platform.java's also expect to be compiled against the common code.
Pro: Adding platform-stub allows us to remove the platformJar stuff from the OpenJDK build. Turns out this was just a hack to allow android-platform to build on OpenJDK so compiling against a stub is cleaner.
Con: the common build's processTestResources task seems to try and copy all the resources twice causing an error. Added a hacky workaround for now.
Major con: The AARs built by the Android build do not contain classes from the common sources. I've tried multiple ways of expressing the dependency and got nowhere so advice would be appreciated.