feat: init commit
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,3 +1,8 @@
|
||||
native-application.iml
|
||||
native-application.ipr
|
||||
native-application.iws
|
||||
.gradle/
|
||||
build/
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
@@ -31,7 +36,8 @@ replay_pid*
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
34
build.gradle
Normal file
34
build.gradle
Normal file
@@ -0,0 +1,34 @@
|
||||
plugins {
|
||||
id 'idea'
|
||||
id 'application'
|
||||
id 'org.graalvm.buildtools.native' version '0.10.6'
|
||||
}
|
||||
|
||||
def addRepo = new File(System.getProperty("user.home"), ".build_add.repo")
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven() { url 'https://maven.aliyun.com/repository/central' }
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
||||
annotationProcessor 'info.picocli:picocli-codegen:4.7.7'
|
||||
implementation 'com.google.guava:guava:30.0-jre'
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
implementation("commons-io:commons-io:2.19.0")
|
||||
implementation("info.picocli:picocli:4.7.7")
|
||||
implementation("com.google.code.gson:gson:2.13.1")
|
||||
}
|
||||
|
||||
|
||||
application {
|
||||
mainClass = 'me.hatter.demo.TestCli'
|
||||
}
|
||||
|
||||
tasks.named('test') {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
8
justfile
Normal file
8
justfile
Normal file
@@ -0,0 +1,8 @@
|
||||
_:
|
||||
@just --list
|
||||
|
||||
idea:
|
||||
buildj :::gradle8.14 idea
|
||||
|
||||
build:
|
||||
JAVA_HOME=$HOME/.sdkman/candidates/java/24.0.1-graal/ buildj :::gradle8.14 nativeCompile
|
||||
24
src/main/java/me/hatter/demo/TestCli.java
Normal file
24
src/main/java/me/hatter/demo/TestCli.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package me.hatter.demo;
|
||||
|
||||
import me.hatter.demo.commands.DemoSubCommand;
|
||||
import picocli.CommandLine;
|
||||
import picocli.CommandLine.Command;
|
||||
|
||||
@Command(name = "example",
|
||||
mixinStandardHelpOptions = true,
|
||||
version = "Picocli example 1.0",
|
||||
subcommands = {
|
||||
DemoSubCommand.class
|
||||
})
|
||||
public class TestCli implements Runnable {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int exitCode = new CommandLine(new TestCli()).execute(args);
|
||||
System.exit(exitCode);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
System.out.println("Use --help for help");
|
||||
}
|
||||
}
|
||||
|
||||
16
src/main/java/me/hatter/demo/commands/DemoSubCommand.java
Normal file
16
src/main/java/me/hatter/demo/commands/DemoSubCommand.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package me.hatter.demo.commands;
|
||||
|
||||
|
||||
import picocli.CommandLine.Command;
|
||||
import picocli.CommandLine.Option;
|
||||
|
||||
@Command(name = "demo", description = "Demo subcommand")
|
||||
public class DemoSubCommand implements Runnable {
|
||||
@Option(names = {"-h", "--help"}, usageHelp = true, description = "Show this help message and exit.")//, hidden = true)
|
||||
boolean helpRequested = false;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("Subcommand demo.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"name": "com.aliyun.security.llm.objects.ScannerArchiveMeta",
|
||||
"allDeclaredConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allDeclaredFields": true,
|
||||
"unsafeAllocated": true
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user