mirror of
https://github.com/ethauvin/bld-archive.git
synced 2025-04-25 21:37:11 -07:00
Compare commits
No commits in common. "main" and "0.4.4" have entirely different histories.
12 changed files with 16 additions and 115 deletions
6
.idea/bld.xml
generated
6
.idea/bld.xml
generated
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="BldConfiguration">
|
|
||||||
<events />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
5
.idea/libraries/bld.xml
generated
5
.idea/libraries/bld.xml
generated
|
@ -2,12 +2,11 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.4.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.4-sources.jar!/" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" />
|
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
|
4
.idea/libraries/compile.xml
generated
4
.idea/libraries/compile.xml
generated
|
@ -2,16 +2,12 @@
|
||||||
<library name="compile">
|
<library name="compile">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" />
|
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" type="SOURCES" />
|
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
1
.idea/libraries/runtime.xml
generated
1
.idea/libraries/runtime.xml
generated
|
@ -2,7 +2,6 @@
|
||||||
<library name="runtime">
|
<library name="runtime">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
<root url="file://$PROJECT_DIR$/src/main/resources" />
|
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
|
|
4
.idea/libraries/test.xml
generated
4
.idea/libraries/test.xml
generated
|
@ -2,16 +2,12 @@
|
||||||
<library name="test">
|
<library name="test">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" />
|
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" type="SOURCES" />
|
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -7,7 +7,7 @@
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.bld/dist/bld-2.0.1.jar",
|
"${HOME}/.bld/dist/bld-1.7.4.jar",
|
||||||
"lib/compile/*.jar",
|
"lib/compile/*.jar",
|
||||||
"lib/runtime/*.jar",
|
"lib/runtime/*.jar",
|
||||||
"lib/test/*.jar"
|
"lib/test/*.jar"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||||
[](https://rife2.com/bld)
|
|
||||||
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-archive)
|
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-archive)
|
||||||
[](https://github.com/rife2/bld-archive/actions/workflows/bld.yml)
|
[](https://github.com/rife2/bld-archive/actions/workflows/bld.yml)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -3,4 +3,4 @@ bld.downloadExtensionSources=true
|
||||||
bld.extensions=
|
bld.extensions=
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.version=2.0.1
|
bld.version=1.7.4
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
bld.repo.github=https://maven.pkg.github.com/rife2/bld-archive
|
|
|
@ -19,7 +19,7 @@ public class ArchiveBuild extends Project {
|
||||||
public ArchiveBuild() {
|
public ArchiveBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "Archive";
|
name = "Archive";
|
||||||
version = version(0,5,0);
|
version = version(0,4,4);
|
||||||
archiveBaseName = "bld-archive";
|
archiveBaseName = "bld-archive";
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
|
@ -28,11 +28,11 @@ public class ArchiveBuild extends Project {
|
||||||
|
|
||||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("com.uwyn.rife2", "bld", version(2,0,1)))
|
.include(dependency("com.uwyn.rife2", "bld", version(1,7,4)))
|
||||||
.include(dependency("org.apache.commons", "commons-compress", version(1,27,1)));
|
.include(dependency("org.apache.commons", "commons-compress", version(1,24,0)));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5,11,0)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5,9,3)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,11,0)));
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,9,3)));
|
||||||
|
|
||||||
javadocOperation()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
|
@ -41,7 +41,6 @@ public class ArchiveBuild extends Project {
|
||||||
|
|
||||||
publishOperation()
|
publishOperation()
|
||||||
.repository(version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases"))
|
.repository(version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases"))
|
||||||
.repository(repository("github"))
|
|
||||||
.info()
|
.info()
|
||||||
.groupId("com.uwyn.rife2")
|
.groupId("com.uwyn.rife2")
|
||||||
.artifactId("bld-archive")
|
.artifactId("bld-archive")
|
||||||
|
|
|
@ -7,20 +7,15 @@ package rife.bld.extension;
|
||||||
import org.apache.commons.compress.archivers.zip.UnixStat;
|
import org.apache.commons.compress.archivers.zip.UnixStat;
|
||||||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
||||||
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.compress.utils.IOUtils;
|
||||||
import rife.bld.NamedFile;
|
import rife.bld.NamedFile;
|
||||||
import rife.bld.operations.AbstractOperation;
|
import rife.bld.operations.AbstractOperation;
|
||||||
import rife.tools.FileUtils;
|
import rife.tools.FileUtils;
|
||||||
import rife.tools.StringUtils;
|
import rife.tools.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.util.*;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -140,49 +135,10 @@ public class ZipOperation extends AbstractOperation<ZipOperation> {
|
||||||
*
|
*
|
||||||
* @param directories source directories
|
* @param directories source directories
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
* @see #sourceDirectories(List)
|
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public ZipOperation sourceDirectories(File... directories) {
|
public ZipOperation sourceDirectories(File... directories) {
|
||||||
return sourceDirectories(List.of(directories));
|
sourceDirectories_.addAll(List.of(directories));
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides source directories that will be used for the zip archive creation.
|
|
||||||
*
|
|
||||||
* @param directories source directories
|
|
||||||
* @return this operation instance
|
|
||||||
* @see #sourceDirectoriesPaths(List)
|
|
||||||
* @since 1.0
|
|
||||||
*/
|
|
||||||
public ZipOperation sourceDirectories(Path... directories) {
|
|
||||||
return sourceDirectoriesPaths(List.of(directories));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides source directories that will be used for the zip archive creation.
|
|
||||||
*
|
|
||||||
* @param directories source directories
|
|
||||||
* @return this operation instance
|
|
||||||
* @see #sourceDirectoriesStrings(List)
|
|
||||||
* @since 1.0
|
|
||||||
*/
|
|
||||||
public ZipOperation sourceDirectories(String... directories) {
|
|
||||||
return sourceDirectoriesStrings(List.of(directories));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides a list of source directories that will be used for the zip archive creation.
|
|
||||||
* <p>
|
|
||||||
* A copy will be created to allow this list to be independently modifiable.
|
|
||||||
*
|
|
||||||
* @param directories a list of source directories
|
|
||||||
* @return this operation instance
|
|
||||||
* @see #sourceDirectories(File...)
|
|
||||||
* @since 1.0
|
|
||||||
*/
|
|
||||||
public ZipOperation sourceDirectories(List<File> directories) {
|
|
||||||
sourceDirectories_.addAll(directories);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,25 +149,11 @@ public class ZipOperation extends AbstractOperation<ZipOperation> {
|
||||||
*
|
*
|
||||||
* @param directories a list of source directories
|
* @param directories a list of source directories
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
* @see #sourceDirectories(Path...)
|
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public ZipOperation sourceDirectoriesPaths(List<Path> directories) {
|
public ZipOperation sourceDirectories(List<File> directories) {
|
||||||
return sourceDirectories(directories.stream().map(Path::toFile).toList());
|
sourceDirectories_.addAll(directories);
|
||||||
}
|
return this;
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides a list of source directories that will be used for the zip archive creation.
|
|
||||||
* <p>
|
|
||||||
* A copy will be created to allow this list to be independently modifiable.
|
|
||||||
*
|
|
||||||
* @param directories a list of source directories
|
|
||||||
* @return this operation instance
|
|
||||||
* @see #sourceDirectories(String...)
|
|
||||||
* @since 1.0
|
|
||||||
*/
|
|
||||||
public ZipOperation sourceDirectoriesStrings(List<String> directories) {
|
|
||||||
return sourceDirectories(directories.stream().map(File::new).toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -252,28 +194,6 @@ public class ZipOperation extends AbstractOperation<ZipOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides the destination directory in which the zip archive will be created.
|
|
||||||
*
|
|
||||||
* @param directory the zip destination directory
|
|
||||||
* @return this operation instance
|
|
||||||
* @since 1.0
|
|
||||||
*/
|
|
||||||
public ZipOperation destinationDirectory(Path directory) {
|
|
||||||
return destinationDirectory(directory.toFile());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides the destination directory in which the zip archive will be created.
|
|
||||||
*
|
|
||||||
* @param directory the zip destination directory
|
|
||||||
* @return this operation instance
|
|
||||||
* @since 1.0
|
|
||||||
*/
|
|
||||||
public ZipOperation destinationDirectory(String directory) {
|
|
||||||
return destinationDirectory(new File(directory));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the destination file name that will be used for the zip archive creation.
|
* Provides the destination file name that will be used for the zip archive creation.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue