Skip to content

Conversation

lacasseio
Copy link
Contributor

Context

See gradle/gradle-native#160. This wraps up the work from the Montreal meetup.

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation
  • Recognize contributor in release notes

@lacasseio lacasseio added a:feature A new functionality from:member in:native-platform c, cpp, swift and other native languages support, etc labels Oct 24, 2017
@lacasseio lacasseio added this to the 4.4 RC1 milestone Oct 24, 2017
@lacasseio lacasseio self-assigned this Oct 24, 2017
@lacasseio lacasseio force-pushed the lacasseio/native/static-variant branch from c1057dd to 31c4602 Compare October 24, 2017 22:23
sharedLibrary("logger/build/lib/main/debug/shared/logger").assertExists()
executable("app/build/exe/main/debug/shared/app").assertExists()
installation("app/build/install/main/debug/shared").exec().out == app.expectedOutput
file("app/build/install/main/debug/shared/lib").assertHasDescendants([
Copy link
Contributor

Choose a reason for hiding this comment

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

should add something to the NativeInstallationFixture to do this assertion, rather than duplicating knowledge of the layout in all of the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


result.assertTasksExecuted(compileAndLinkTasks(debug))
sharedLibrary("build/lib/main/debug/shared/hello").assertExists()
staticLibrary("build/lib/main/debug/static/hello").assertDoesNotExist()
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to be careful with 'does not exist' assertions in tests, these are unreliable unless we also verify 'exists' of the same thing somewhere else in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

mainMetadata.variant("releaseShared-link").availableAt.coords == "some.group:test_releaseShared:1.2"
mainMetadata.variant("releaseShared-runtime").availableAt.coords == "some.group:test_releaseShared:1.2"

assertSharedLibraryPublished(repo, 'debug')
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't want more modules, I think. The shared and static debug binaries should live in the debug module, and the shared and static release binaries should live in the release module.

*
* @since 4.4
*/
CppExecutable getDebugStaticExecutable();
Copy link
Contributor

Choose a reason for hiding this comment

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

these don't make sense for applications, or at least, not many applications at all.

* limitations under the License.
*/

package org.gradle.language.cpp;
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe should live somewhere more general than cpp.

project.getComponents().add(application);
project.getComponents().add(application.getDebugExecutable());
project.getComponents().add(application.getReleaseExecutable());
project.getComponents().add(application.getDebugStaticExecutable());
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want to add 'link everything statically' variants as a convention for applications. This (usually) doesn't make sense. That doesn't mean that this never happens, but for that situation we only need to make it possible to configure the build so that it will produce a 'link everything statically' variant, not the default.

}
});
extension.getPublications().create("debug", MavenPublication.class, new Action<MavenPublication>() {
extension.getPublications().create("debugShared", MavenPublication.class, new Action<MavenPublication>() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want separate modules for (debug, release) x (shared, static) combination. I think we want a debug module that contains all the debug binaries, and a release module that contains all the release binaries.

}
});

extension.getPublications().create("debugStatic", MavenPublication.class, new Action<MavenPublication>() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we just want a debug module with all of the debug binaries in it, and a release module with all of the release binaries in it.

@lacasseio
Copy link
Contributor Author

Closing this as abandon for now.

@lacasseio lacasseio closed this Oct 25, 2017
@ov7a ov7a removed this from the 4.4 RC1 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:feature A new functionality in:native-platform c, cpp, swift and other native languages support, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants