|
| 1 | + |
| 2 | + |
| 3 | +<h1 align='center'>Argument File</h1> |
| 4 | +<p align='center'>Argument file generator.</p> |
| 5 | +<p align="center"> |
| 6 | + <a href="https://github.com/wniemiec-io-java/argument-file/actions/workflows/windows.yml"><img src="https://github.com/wniemiec-io-java/argument-file/actions/workflows/windows.yml/badge.svg" alt=""></a> |
| 7 | + <a href="https://github.com/wniemiec-io-java/argument-file/actions/workflows/macos.yml"><img src="https://github.com/wniemiec-io-java/argument-file/actions/workflows/macos.yml/badge.svg" alt=""></a> |
| 8 | + <a href="https://github.com/wniemiec-io-java/argument-file/actions/workflows/ubuntu.yml"><img src="https://github.com/wniemiec-io-java/argument-file/actions/workflows/ubuntu.yml/badge.svg" alt=""></a> |
| 9 | + <a href="https://codecov.io/gh/wniemiec-io-java/argument-file"><img src="https://codecov.io/gh/wniemiec-io-java/argument-file/branch/master/graph/badge.svg?token=R2SFS4SP86" alt="Coverage status"></a> |
| 10 | + <a href="http://java.oracle.com"><img src="https://img.shields.io/badge/java-11+-D0008F.svg" alt="Java compatibility"></a> |
| 11 | + <a href="https://mvnrepository.com/artifact/io.github.wniemiec-io-java/argument-file"><img src="https://img.shields.io/maven-central/v/io.github.wniemiec-io-java/argument-file" alt="Maven Central release"></a> |
| 12 | + <a href="https://github.com/wniemiec-io-java/argument-file/blob/master/LICENSE"><img src="https://img.shields.io/github/license/wniemiec-io-java/argument-file" alt="License"></a> |
| 13 | +</p> |
| 14 | +<hr /> |
| 15 | + |
| 16 | +## ❇ Introduction |
| 17 | +To shorten or simplify the javac command, you can specify one or more files that contain arguments to the javac command (except -J options). This enables you to create javac commands of any length on any operating system. An argument file can include javac options and source file names in any combination. |
| 18 | + |
| 19 | +## ❓ How to use |
| 20 | +1. Add one of the options below to the pom.xml file: |
| 21 | + |
| 22 | +#### Using Maven Central (recomended): |
| 23 | +``` |
| 24 | +<dependency> |
| 25 | + <groupId>io.github.wniemiec-io-java</groupId> |
| 26 | + <artifactId>argument-file</artifactId> |
| 27 | + <version>LATEST</version> |
| 28 | +</dependency> |
| 29 | +``` |
| 30 | + |
| 31 | +#### Using GitHub Packages: |
| 32 | +``` |
| 33 | +<dependency> |
| 34 | + <groupId>wniemiec.io.java</groupId> |
| 35 | + <artifactId>argument-file</artifactId> |
| 36 | + <version>LATEST</version> |
| 37 | +</dependency> |
| 38 | +``` |
| 39 | + |
| 40 | +2. Run |
| 41 | +``` |
| 42 | +$ mvn install |
| 43 | +``` |
| 44 | + |
| 45 | +3. Use it |
| 46 | +``` |
| 47 | +[...] |
| 48 | +
|
| 49 | +import wniemiec.io.java.ArgumentFile; |
| 50 | +
|
| 51 | +[...] |
| 52 | +
|
| 53 | +Path workingDirectory = Path.of(System.getProperty("java.io.tmpdir")); |
| 54 | +String filename = "argfile"; |
| 55 | +
|
| 56 | +argumentFile = new ArgumentFile(workingDirectory, filename); |
| 57 | +argumentFile.create(List.of( |
| 58 | + Path.of("C:", "Foo", "Bar", "file1.jar"), |
| 59 | + Path.of("C:", "Foo", "Bar", "file2.jar"), |
| 60 | + Path.of("C:", "Foo") |
| 61 | +); |
| 62 | +
|
| 63 | +[...] |
| 64 | +``` |
| 65 | + |
| 66 | +> javac @argfile.txt |
| 67 | +
|
| 68 | + |
| 69 | +## 📖 Documentation |
| 70 | +| Property |Parameter type|Return type|Description|Default parameter value| |
| 71 | +|----------------|-------------------------------|-----|------------------------|--------| |
| 72 | +|create |`paths: List<Paths>`|`Path`|Generates argument file from a list of paths.| - | |
| 73 | +|delete |`void`|`void`|Removes argument-file| - | |
| 74 | +|exists |`void`|`boolean`|Checks if the argument-file has created.| - | |
| 75 | + |
| 76 | +## 🚩 Changelog |
| 77 | +Details about each version are documented in the [releases section](https://github.com/williamniemiec/wniemiec-io-java/argument-file/releases). |
| 78 | + |
| 79 | +## 🤝 Contribute! |
| 80 | +See the documentation on how you can contribute to the project [here](https://github.com/wniemiec-io-java/argument-file/blob/master/CONTRIBUTING.md). |
| 81 | + |
| 82 | +## 📁 Files |
| 83 | + |
| 84 | +### / |
| 85 | +| Name |Type|Description| |
| 86 | +|----------------|-------------------------------|-----------------------------| |
| 87 | +|dist |`Directory`|Released versions| |
| 88 | +|docs |`Directory`|Documentation files| |
| 89 | +|src |`Directory`| Source files| |
0 commit comments