-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
64 lines (56 loc) · 1.48 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
plugins {
id 'java'
id("com.github.johnrengelman.shadow") version "8.1.1"
id 'org.graalvm.buildtools.native' version '0.10.4'
}
//C:/Users/eunso/.jdks/graalvm-jdk-23.0.1/bin/native-image -jar youtube-cli.jar --no-fallback --enable-url-protocols=https
group = 'xyz.yellowstrawberry'
version = '1.0.2'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.sealedtx:java-youtube-downloader:+'
implementation 'me.tongfei:progressbar:+'
implementation 'org.json:json:+'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
jar {
manifest {
attributes(
'Main-Class': 'xyz.yellowstrawberry.yotubecli.Main',
'Implementation-Version': version
)
}
}
shadowJar {
archiveFileName = 'youtube-cli.jar'
}
graalvmNative {
binaries {
main {
imageName = "youtubecli"
mainClass = "net.yellowstrawberry.youtubecli.Main"
quickBuild = true
useFatJar = true
buildArgs.add("-O4")
}
test {
buildArgs.add("-O0")
}
}
binaries.all {
// buildArgs.add("--verbose")
buildArgs.add("--no-fallback")
buildArgs.add("--enable-url-protocols=https")
}
}
test {
useJUnitPlatform()
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}