Skip to content

Commit

Permalink
Rebase on master and apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
DPUkyle committed May 24, 2021
1 parent f531ec2 commit bf6bbeb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PegasusPluginIntegrationTest extends Specification {
.withProjectDir(tempDir.root)
.withPluginClasspath()
.withArguments('mainDataTemplateJar')
//.forwardOutput()
.forwardOutput()
.build()

then:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2021 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.linkedin.pegasus.gradle.publishing

import org.gradle.testkit.runner.GradleRunner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1834,6 +1834,15 @@ protected GenerateDataTemplateTask configureDataTemplateGeneration(Project proje
// FIXME change to #getArchiveFile(); breaks backwards-compatibility before 5.1
project.getDependencies().add(compileConfigName, project.files(dataTemplateJarTask.getArchivePath()));

// The below Action is only applied when the 'ivy-publish' is applied by the consumer.
// If the consumer does not use ivy-publish, this is a noop.
// this Action prepares the project applying the pegasus plugin to publish artifacts using these steps:
// 1. Registers "feature variants" for pegasus-specific artifacts;
// see https://docs.gradle.org/6.1/userguide/feature_variants.html
// 2. Wires legacy configurations like `dataTemplateCompile` to auto-generated feature variant *Api and
// *Implementation configurations for backwards compatibility.
// 3. Configures the Ivy Publication to include auto-generated feature variant *Api and *Implementation
// configurations and their dependencies.
project.getPlugins().withType(IvyPublishPlugin.class, ivyPublish -> {
if (!isAtLeastGradle61())
{
Expand Down

0 comments on commit bf6bbeb

Please sign in to comment.