Compare commits

..

9 commits
0.4.4 ... main

Author SHA1 Message Date
0a6323640f
Added File argument alternatives with Path and String. 2024-08-28 18:17:02 -07:00
8836a8a6f7
Updated commons-compress to version 1.27.1 2024-08-28 17:58:20 -07:00
0bfd068e94 Upgraded to bld 2.0.1 2024-07-28 21:09:05 -04:00
60fce761ed Updated version to 0.5.0.
Upgraded to bld 2.0.0.
2024-07-28 20:01:01 -04:00
4c013a1b33 Updated for bld 1.9.1.
Updated version to 0.4.8.
2024-05-01 16:44:39 -04:00
c816a564ed Updated for bld 1.9.0.
Updated version to 0.4.7.
2024-02-25 22:44:29 -05:00
50fdf87a4a Added bld badge 2024-01-31 05:50:47 -05:00
0e08fc7e41 Updated for bld 1.8.0
Updated version to 0.4.6
2024-01-30 21:17:43 -05:00
1a841e9559 Updated for bld 1.7.5
Updated version to 0.4.5
2023-10-20 17:09:40 -04:00
12 changed files with 115 additions and 16 deletions

6
.idea/bld.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BldConfiguration">
<events />
</component>
</project>

View file

@ -2,11 +2,12 @@
<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-1.7.4.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.4-sources.jar!/" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<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!/" />

View file

@ -2,12 +2,16 @@
<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>

View file

@ -2,6 +2,7 @@
<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>

View file

@ -2,12 +2,16 @@
<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>

View file

@ -7,7 +7,7 @@
], ],
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-1.7.4.jar", "${HOME}/.bld/dist/bld-2.0.1.jar",
"lib/compile/*.jar", "lib/compile/*.jar",
"lib/runtime/*.jar", "lib/runtime/*.jar",
"lib/test/*.jar" "lib/test/*.jar"

View file

@ -2,6 +2,7 @@
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[![bld](https://img.shields.io/badge/2.0.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Release](https://flat.badgen.net/maven/v/metadata-url/https:/repo.rife2.com/releases/com/uwyn/rife2/bld-archive/maven-metadata.xml)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-archive) [![Release](https://flat.badgen.net/maven/v/metadata-url/https:/repo.rife2.com/releases/com/uwyn/rife2/bld-archive/maven-metadata.xml)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-archive)
[![GitHub CI](https://github.com/rife2/bld-archive/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-archive/actions/workflows/bld.yml) [![GitHub CI](https://github.com/rife2/bld-archive/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-archive/actions/workflows/bld.yml)

Binary file not shown.

View file

@ -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=1.7.4 bld.version=2.0.1

1
local.properties Normal file
View file

@ -0,0 +1 @@
bld.repo.github=https://maven.pkg.github.com/rife2/bld-archive

View file

@ -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,4,4); version = version(0,5,0);
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(1,7,4))) .include(dependency("com.uwyn.rife2", "bld", version(2,0,1)))
.include(dependency("org.apache.commons", "commons-compress", version(1,24,0))); .include(dependency("org.apache.commons", "commons-compress", version(1,27,1)));
scope(test) scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5,9,3))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5,11,0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,9,3))); .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,11,0)));
javadocOperation() javadocOperation()
.javadocOptions() .javadocOptions()
@ -41,6 +41,7 @@ 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")

View file

@ -7,15 +7,20 @@ 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.compress.utils.IOUtils; import org.apache.commons.io.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.*; import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.*; import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
@ -135,10 +140,49 @@ 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) {
sourceDirectories_.addAll(List.of(directories)); return sourceDirectories(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;
} }
@ -149,11 +193,25 @@ 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 sourceDirectories(List<File> directories) { public ZipOperation sourceDirectoriesPaths(List<Path> directories) {
sourceDirectories_.addAll(directories); return sourceDirectories(directories.stream().map(Path::toFile).toList());
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());
} }
/** /**
@ -194,6 +252,28 @@ 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.
* *