Skip to content

Commit

Permalink
Merge pull request #23 from palantir/bugfix/licenses
Browse files Browse the repository at this point in the history
Add missing license headers
  • Loading branch information
markelliot committed Jan 17, 2016
2 parents 1f38044 + 4110dcf commit b47b987
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 10 deletions.
28 changes: 24 additions & 4 deletions src/main/groovy/com/palantir/gradle/docker/DockerComponent.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
/*
* Copyright 2015 Palantir Technologies
*
* 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.palantir.gradle.docker;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;

import org.gradle.api.artifacts.DependencySet;
import org.gradle.api.artifacts.ModuleDependency;
import org.gradle.api.artifacts.PublishArtifact;
import org.gradle.api.internal.component.SoftwareComponentInternal;
import org.gradle.api.internal.component.Usage;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;

public class DockerComponent implements SoftwareComponentInternal {
private final Usage runtimeUsage = new RuntimeUsage();
private final LinkedHashSet<PublishArtifact> artifacts = new LinkedHashSet<>();
Expand All @@ -20,23 +35,28 @@ public DockerComponent(PublishArtifact dockerArtifact, DependencySet runtimeDepe
this.runtimeDependencies = runtimeDependencies;
}

@Override
public String getName() {
return "docker";
}

@Override
public Set<Usage> getUsages() {
return Collections.singleton(runtimeUsage);
}

private class RuntimeUsage implements Usage {
@Override
public String getName() {
return "runtime";
}

@Override
public Set<PublishArtifact> getArtifacts() {
return artifacts;
}

@Override
public Set<ModuleDependency> getDependencies() {
return runtimeDependencies.withType(ModuleDependency.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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>
* 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,
Expand All @@ -15,9 +15,10 @@
*/
package com.palantir.gradle.docker

import com.google.common.base.Preconditions
import org.gradle.api.Project

import com.google.common.base.Preconditions

class DockerComposeExtension {
Project project

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
/*
* Copyright 2015 Palantir Technologies
*
* 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.palantir.gradle.docker

import com.google.common.base.Preconditions
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Copy

import com.google.common.base.Preconditions

class DockerComposePlugin implements Plugin<Project> {
@Override
void apply(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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>
* 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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>
* 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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2015 Palantir Technologies
*
* 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.palantir.gradle.docker

import org.gradle.testkit.runner.GradleRunner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2015 Palantir Technologies
*
* 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.palantir.gradle.docker

import org.gradle.testkit.runner.BuildResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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>
* 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,
Expand Down

0 comments on commit b47b987

Please sign in to comment.