-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[packagers] support Fedora COPR via spec. Resolves #438
[gradle] add missing macports accessors. Fixes #562
- Loading branch information
Showing
34 changed files
with
887 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
core/jreleaser-model/src/main/java/org/jreleaser/model/Spec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright 2020-2021 The JReleaser authors. | ||
* | ||
* 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 | ||
* | ||
* https://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 org.jreleaser.model; | ||
|
||
import java.util.ArrayList; | ||
import java.util.LinkedHashSet; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import static org.jreleaser.util.StringUtils.isBlank; | ||
|
||
/** | ||
* @author Andres Almiray | ||
* @since 0.9.1 | ||
*/ | ||
public class Spec extends AbstractRepositoryTool { | ||
public static final String NAME = "spec"; | ||
private final List<String> requires = new ArrayList<>(); | ||
private final SpecRepository repository = new SpecRepository(); | ||
|
||
private String release; | ||
|
||
public Spec() { | ||
super(NAME); | ||
} | ||
|
||
void setAll(Spec spec) { | ||
super.setAll(spec); | ||
this.release = spec.release; | ||
setRepository(spec.repository); | ||
setRequires(spec.requires); | ||
} | ||
|
||
public String getRelease() { | ||
return release; | ||
} | ||
|
||
public void setRelease(String release) { | ||
this.release = release; | ||
} | ||
|
||
public SpecRepository getRepository() { | ||
return repository; | ||
} | ||
|
||
public void setRepository(SpecRepository repository) { | ||
this.repository.setAll(repository); | ||
} | ||
|
||
public List<String> getRequires() { | ||
return requires; | ||
} | ||
|
||
public void setRequires(List<String> requires) { | ||
this.requires.clear(); | ||
this.requires.addAll(requires); | ||
} | ||
|
||
@Override | ||
protected void asMap(boolean full, Map<String, Object> props) { | ||
super.asMap(full, props); | ||
props.put("release", release); | ||
props.put("requires", requires); | ||
props.put("repository", repository.asMap(full)); | ||
} | ||
|
||
@Override | ||
public RepositoryTap getRepositoryTap() { | ||
return repository; | ||
} | ||
|
||
@Override | ||
public boolean supportsPlatform(String platform) { | ||
return isBlank(platform); | ||
} | ||
|
||
@Override | ||
public boolean supportsDistribution(Distribution distribution) { | ||
return distribution.getType() == Distribution.DistributionType.JAVA_BINARY; | ||
} | ||
|
||
@Override | ||
public Set<String> getSupportedExtensions() { | ||
Set<String> set = new LinkedHashSet<>(); | ||
set.add(".tar.gz"); | ||
set.add(".tgz"); | ||
set.add(".tar"); | ||
return set; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
core/jreleaser-model/src/main/java/org/jreleaser/model/SpecRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright 2020-2021 The JReleaser authors. | ||
* | ||
* 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 | ||
* | ||
* https://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 org.jreleaser.model; | ||
|
||
/** | ||
* @author Andres Almiray | ||
* @since 0.9.1 | ||
*/ | ||
public class SpecRepository extends AbstractRepositoryTap { | ||
public SpecRepository() { | ||
super("spec", "spec"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.