Skip to content

Conversation

rieske
Copy link
Contributor

@rieske rieske commented Aug 21, 2020

Focus on the multi-repo use case and demonstrate how convention plugins can be published and consumed from another project.

… sample

Focus on the multi-repo use case and demonstrate how convention plugins can be published and consumed from another project.
@rieske rieske added in:core @core Issue owned by GBT Core labels Aug 21, 2020
@rieske rieske requested a review from a team August 21, 2020 07:59
@rieske rieske self-assigned this Aug 21, 2020
Base automatically changed from vv/inline-convention-plugins-sample-buildSrc to master August 21, 2020 11:45
Copy link
Contributor

@jjohannes jjohannes left a comment

Choose a reason for hiding this comment

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

Well done! I like the sample a lot.

I found some smallish things.

There are leftover setting files in the subprojects that should be removed:

  • convention-plugins/settings.gradle(.kts)

// tag::plugins[]
plugins {
id("myproject.java-conventions")
id("com.myorg.java-conventions")
Copy link
Contributor

Choose a reason for hiding this comment

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

The integration test setup below does not follow what we would recommend today. Following what we do here:
https://github.com/gradle/gradle/blob/418a06a84863e20bebcdebc924761e6312d53626/subprojects/docs/src/samples/java/modules-multi-project-with-integration-tests/kotlin/buildSrc/src/main/kotlin/myproject.java-conventions.gradle.kts

It could look like this:

val integrationTest by sourceSets.creating

configurations[integrationTest.implementationConfigurationName].extendsFrom(configurations.testImplementation.get())
configurations[integrationTest.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get())

val integrationTestTask = tasks.register<Test>("integrationTest") {
    testClassesDirs = integrationTest.output.classesDirs
    classpath = integrationTest.runtimeClasspath

    shouldRunAfter(tasks.test)
}

dependencies {
    "integrationTestImplementation"(project)
}

rieske and others added 14 commits August 24, 2020 07:16
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
…vention-plugins/README.adoc

Co-authored-by: Jendrik Johannes <[email protected]>
@rieske rieske requested a review from jjohannes August 24, 2020 06:28
Copy link
Contributor

@jjohannes jjohannes left a comment

Choose a reason for hiding this comment

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

Looks great.

I only have a suggestion to shorten title and description so that it fits into one line when rendered.

rieske and others added 2 commits August 24, 2020 10:44
@rieske rieske merged commit d98d764 into master Aug 24, 2020
@rieske rieske deleted the vv/puglishing-convention-plugins-sample branch August 24, 2020 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@core Issue owned by GBT Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants