Skip to content

Commit

Permalink
Merge pull request #666 from jjiwooLim/643-internal
Browse files Browse the repository at this point in the history
add @internal annotation
  • Loading branch information
cherylking authored Dec 8, 2021
2 parents fed46a4 + 117b23a commit 98dc9d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.options.Option
import org.gradle.api.tasks.Input
import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder

Expand All @@ -40,6 +41,7 @@ public class AbstractFeatureTask extends AbstractServerTask {

private InstallFeatureUtil util;

@Internal
Project newProject = project;

@Option(option = 'serverDir', description = '(Optional) Server directory to get the list of features from.')
Expand Down Expand Up @@ -98,6 +100,7 @@ public class AbstractFeatureTask extends AbstractServerTask {
public File downloadArtifact(String groupId, String artifactId, String type, String version) throws PluginExecutionException {

String coordinates = groupId + ":" + artifactId + ":" + version + "@" + type

def dep = newProject.dependencies.create(coordinates)
def config = newProject.configurations.detachedConfiguration(dep)

Expand Down Expand Up @@ -143,6 +146,7 @@ public class AbstractFeatureTask extends AbstractServerTask {
return features
}

@Internal
protected List<String> getAdditionalJsonList() {
List<String> result = new ArrayList<String>()
project.configurations.featuresBom.dependencies.each { dep ->
Expand Down Expand Up @@ -205,7 +209,7 @@ public class AbstractFeatureTask extends AbstractServerTask {
}

protected InstallFeatureUtil getInstallFeatureUtil(Set<String> pluginListedEsas, List<ProductProperties> propertiesList, String openLibertyVerion, String containerName, List<String> additionalJsons) throws PluginExecutionException {
//if installing userFeature, recompile gradle to find mavenLocal artifacts created by prepareFeature task.
//if installing userFeature, recompile gradle to find mavenLocal artifacts created by prepareFeature task.
if(project.configurations.featuresBom.dependencies) {
try {
ProjectBuilder builder = ProjectBuilder.builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.gradle.api.artifacts.ResolveException
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.options.Option
import org.gradle.api.tasks.Internal

import io.openliberty.tools.common.plugins.util.PrepareFeatureUtil
import io.openliberty.tools.common.plugins.util.PluginExecutionException
Expand Down Expand Up @@ -114,6 +115,7 @@ public class AbstractPrepareTask extends AbstractServerTask {
}
}

@Internal
protected List<String> getDependencyBoms() {
List<String> result = new ArrayList<String>()
project.configurations.featuresBom.dependencies.each { dep ->
Expand Down

0 comments on commit 98dc9d3

Please sign in to comment.