feat: init commit

This commit is contained in:
2025-05-03 22:09:32 +08:00
parent bb49f9a2a8
commit 9a1817e859
6 changed files with 98 additions and 1 deletions

6
.gitignore vendored
View File

@@ -1,3 +1,8 @@
native-application.iml
native-application.ipr
native-application.iws
.gradle/
build/
# ---> Java
# Compiled class file
*.class
@@ -33,6 +38,7 @@ replay_pid*
# Icon must end with two \r
Icon
# Thumbnails
._*

34
build.gradle Normal file
View 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
View 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

View 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");
}
}

View 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.");
}
}

View File

@@ -0,0 +1,9 @@
[
{
"name": "com.aliyun.security.llm.objects.ScannerArchiveMeta",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"unsafeAllocated": true
}
]