-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle.kts
128 lines (111 loc) · 3.3 KB
/
build.gradle.kts
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.ktor)
alias(libs.plugins.serilization)
`maven-publish`
signing
}
group = "app.revanced"
tasks {
processResources {
expand("projectVersion" to project.version)
}
// Used by gradle-semantic-release-plugin.
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435.
publish {
dependsOn(shadowJar)
}
shadowJar {
// Needed for Jetty to work.
mergeServiceFiles()
}
}
application {
mainClass.set("app.revanced.api.command.MainCommandKt")
}
ktor {
fatJar {
archiveFileName.set("${project.name}-${project.version}.jar")
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
}
}
tasks {
test {
useJUnitPlatform()
}
}
repositories {
mavenCentral()
google()
mavenLocal()
maven {
// A repository must be specified for some reason. "registry" is a dummy.
url = uri("https://maven.pkg.github.com/revanced/registry")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.cio)
implementation(libs.ktor.client.okhttp)
implementation(libs.ktor.client.auth)
implementation(libs.ktor.client.resources)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.server.core)
implementation(libs.ktor.server.content.negotiation)
implementation(libs.ktor.server.auth)
implementation(libs.ktor.server.auth.jwt)
implementation(libs.ktor.server.cors)
implementation(libs.ktor.server.caching.headers)
implementation(libs.ktor.server.rate.limit)
implementation(libs.ktor.server.host.common)
implementation(libs.ktor.server.jetty)
implementation(libs.ktor.server.call.logging)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.koin.ktor)
implementation(libs.kompendium.core)
implementation(libs.h2)
implementation(libs.logback.classic)
implementation(libs.exposed.core)
implementation(libs.exposed.jdbc)
implementation(libs.exposed.dao)
implementation(libs.exposed.kotlin.datetime)
implementation(libs.dotenv.kotlin)
implementation(libs.ktoml.core)
implementation(libs.ktoml.file)
implementation(libs.picocli)
implementation(libs.kotlinx.datetime)
implementation(libs.revanced.patcher)
implementation(libs.revanced.library)
implementation(libs.caffeine)
implementation(libs.bouncy.castle.provider)
implementation(libs.bouncy.castle.pgp)
testImplementation(kotlin("test"))
}
// The maven-publish plugin is necessary to make signing work.
publishing {
repositories {
mavenLocal()
}
publications {
create<MavenPublication>("revanced-api-publication") {
from(components["java"])
}
}
}
signing {
useGpgCmd()
sign(publishing.publications["revanced-api-publication"])
}