add dependabot

This commit is contained in:
crschnick 2023-04-09 13:18:11 +00:00
parent ecef6c15af
commit 8e5cab4ec2
2 changed files with 6 additions and 84 deletions

6
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"

84
dist/cli.gradle vendored
View file

@ -1,84 +0,0 @@
import java.nio.file.Files
import java.nio.file.Paths
import java.nio.file.StandardCopyOption
def distDir = "$buildDir/dist"
apply plugin: 'org.asciidoctor.jvm.convert'
asciidoctor {
dependsOn(project(':cli').runManPageGenerator)
sourceDir = file("${project(':cli').buildDir}/generated-picocli-docs")
outputDir = file("$distDir/docs")
logDocuments = false
outputOptions {
backends = ['manpage', 'html5']
}
inProcess = JAVA_EXEC
forkOptions {
jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED")
}
options header_footer: false
}
task copyCompletion(type: Copy) {
dependsOn(project(':cli').runAutocompleteGenerator)
from new File(project(':cli').buildDir, 'xpipe_completion')
into "$distDir/cli"
}
task setupMusl(type: Exec) {
commandLine "${project(':cli').projectDir.toString()}/musl-setup.sh", project(':cli').projectDir.toString()
}
task buildCli(type: DefaultTask) {
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
dependsOn(setupMusl)
project(':cli').getTasksByName('nativeCompile', true).forEach(v->v.mustRunAfter(setupMusl))
}
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
dependsOn(project(':cli').getTasksByName('nativeCompile', true))
}
doLast {
if (rootProject.os.isWindows()) {
exec {
executable project(':cli').projectDir.toString() + '/native-build.bat'
environment System.getenv()
}
}
if (rootProject.os.isLinux()) {
exec {
commandLine project(':cli').projectDir.toString() + '/native-build-musl.sh', project(':cli').projectDir.toString()
environment System.getenv()
}
}
Files.createDirectories(Paths.get(distDir, 'cli'))
def ending = rootProject.os.isWindows() ? ".exe" : ""
var outputFile = Paths.get(project(':cli').buildDir.toString() + "/native/nativeCompile/xpipe$ending")
if (!Files.exists(outputFile)) {
throw new IOException("Cli output file does not exist")
}
Files.copy(outputFile, Paths.get(distDir, 'cli', "xpipe$ending"), StandardCopyOption.REPLACE_EXISTING)
}
}
if (rootProject.os.isWindows() && rootProject.fullVersion) {
task signCliExecutable(type: Exec) {
commandLine "$projectDir\\tools\\sign_cli.bat"
}
buildCli.finalizedBy(signCliExecutable)
task iconCliExecutable(type: Exec) {
commandLine "$projectDir\\tools\\rcedit-x64.exe", "$distDir\\cli\\xpipe.exe", '--set-icon', "$projectDir\\logo\\logo.ico"
}
buildCli.finalizedBy(iconCliExecutable)
}
buildCli.dependsOn(copyCompletion)
buildCli.dependsOn(asciidoctor)