mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 17:10:27 +00:00
72 lines
1.9 KiB
Groovy
72 lines
1.9 KiB
Groovy
|
|
plugins {
|
|
id 'org.beryx.jlink' version '2.26.0'
|
|
id "org.moditect.gradleplugin" version "1.0.0-rc3"
|
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
|
id 'org.jreleaser' version '1.8.0'
|
|
id("com.netflix.nebula.ospackage") version "11.4.0"
|
|
id 'org.gradle.crypto.checksum' version '1.4.0'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
task dist(type: DefaultTask) {}
|
|
|
|
|
|
distTar {
|
|
enabled = false;
|
|
}
|
|
|
|
distZip {
|
|
enabled = false;
|
|
}
|
|
|
|
import org.gradle.crypto.checksum.Checksum
|
|
def distDir = layout.buildDirectory.get().dir('dist')
|
|
task createChecksums(type: Checksum) {
|
|
inputFiles.setFrom(distDir.dir('artifacts').getAsFileTree().files)
|
|
outputDirectory.set(layout.buildDirectory.dir("dist/checksums"))
|
|
checksumAlgorithm.set(Checksum.Algorithm.SHA256)
|
|
|
|
doLast {
|
|
for (final def file in distDir.dir('checksums').getAsFileTree().files) {
|
|
artifactChecksums.put(file.name.lastIndexOf('.').with {it != -1 ? file.name[0..<it] : file.name}, file.text.trim())
|
|
}
|
|
}
|
|
}
|
|
|
|
clean {
|
|
doFirst {
|
|
// Fix clean failing when file is read-only
|
|
if (file("$distDir").exists()) {
|
|
file("$distDir").traverse { f -> if (f.exists() && f.isFile()) f.writable = true }
|
|
}
|
|
}
|
|
}
|
|
|
|
dist.finalizedBy(createChecksums)
|
|
|
|
apply from: 'base.gradle'
|
|
apply from: 'jpackage.gradle'
|
|
|
|
if (rootProject.fullVersion) {
|
|
apply from: 'cli.gradle'
|
|
apply from: 'portable.gradle'
|
|
apply from: 'proguard.gradle'
|
|
|
|
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
|
|
apply from: 'linux_packages.gradle'
|
|
} else if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
|
apply from: 'msi.gradle'
|
|
} else if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
|
apply from: 'pkg.gradle'
|
|
}
|
|
|
|
apply from: 'jreleaser.gradle'
|
|
apply from: 'aur.gradle'
|
|
apply from: 'nix.gradle'
|
|
apply from: 'choco.gradle'
|
|
apply from: 'test.gradle'
|
|
}
|