mirror of
https://github.com/wgtunnel/desktop.git
synced 2026-06-02 08:33:41 +02:00
chore: publish parser to maven
This commit is contained in:
+4
-1
@@ -16,7 +16,10 @@ data class TunnelsUiState(
|
||||
|
||||
data class TunnelUiItem(val config: TunnelConfig, val status: TunnelStatus? = null) {
|
||||
val isRunning: Boolean
|
||||
get() = status?.state != TunnelState.DOWN && status?.state != TunnelState.STOPPING && status != null
|
||||
get() =
|
||||
status?.state != TunnelState.DOWN &&
|
||||
status?.state != TunnelState.STOPPING &&
|
||||
status != null
|
||||
|
||||
val stateColor: Color
|
||||
get() = status?.state?.asColor() ?: TunnelState.DOWN.asColor()
|
||||
|
||||
@@ -50,6 +50,8 @@ androidx-room = "2.8.4"
|
||||
androidx-sqlite = "2.6.2"
|
||||
|
||||
lang3 = "3.20.0"
|
||||
humanReadable = "1.12.3"
|
||||
datetime = "0.7.1"
|
||||
|
||||
[bundles]
|
||||
ktor-client-jvm = ["ktor-client-core-jvm", "ktor-client-cio-jvm", "ktor-client-content-negotiation-jvm", "ktor-serialization-json-jvm", "ktor-client-okhttp", "ktor-client-websockets-jvm"]
|
||||
@@ -184,6 +186,9 @@ filekit-dialogs-compose = { module = "io.github.vinceglb:filekit-dialogs-compose
|
||||
|
||||
multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "mps" }
|
||||
|
||||
human-readable = { module = "nl.jacobras:Human-Readable", version.ref = "humanReadable" }
|
||||
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "datetime" }
|
||||
|
||||
|
||||
[plugins]
|
||||
composeHotReload = { id = "org.jetbrains.compose.hot-reload", version.ref = "composeHotReload" }
|
||||
@@ -198,4 +203,3 @@ buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig
|
||||
ktfmt = { id = "com.ncorti.ktfmt.gradle", version.ref = "ktfmt" }
|
||||
licensee = { id = "app.cash.licensee", version.ref = "licensee" }
|
||||
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" }
|
||||
resources = { id = "org.jetbrains.compose.resources", version.ref = "kotlin" }
|
||||
|
||||
+53
-2
@@ -1,6 +1,8 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
alias(libs.plugins.serialization)
|
||||
`maven-publish`
|
||||
signing
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -11,8 +13,57 @@ dependencies {
|
||||
implementation(libs.crypto.rand)
|
||||
implementation(libs.curve25519.kotlin)
|
||||
|
||||
implementation("nl.jacobras:Human-Readable:1.12.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1")
|
||||
implementation(libs.human.readable)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
}
|
||||
|
||||
tasks.test { useJUnitPlatform() }
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
register<MavenPublication>("release") {
|
||||
groupId = "com.zaneschepke.wireguardautotunnel"
|
||||
artifactId = "amneziawg-parser"
|
||||
version = "1.0.0"
|
||||
from(components["java"])
|
||||
pom {
|
||||
name.set("AmneziaWG Parser")
|
||||
description.set("An AmneziaWG parser")
|
||||
url.set("https://wgtunnel.com/")
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name.set("MIT")
|
||||
url.set("https://opensource.org/licenses/MIT")
|
||||
distribution.set("repo")
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection.set("scm:git:git://github.com/wgtunnel/desktop.git")
|
||||
developerConnection.set("scm:git:ssh://github.com/wgtunnel/desktop.git")
|
||||
url.set("https://github.com/wgtunnel/desktop")
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
name.set("Zane Schepke")
|
||||
email.set("support@zaneschepke.com")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
signing {
|
||||
useInMemoryPgpKeys(
|
||||
LocalProperties.get("SECRET_KEY") ?: System.getenv("SECRET_KEY"),
|
||||
LocalProperties.get("PASSWORD") ?: System.getenv("PASSWORD")
|
||||
)
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import java.util.Properties
|
||||
|
||||
rootProject.name = "wgtunnel"
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
|
||||
@@ -18,7 +20,27 @@ dependencyResolutionManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.gradleup.nmcp.settings").version("1.4.4")
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||
}
|
||||
|
||||
fun localProperty(name: String): String? {
|
||||
val props = Properties()
|
||||
val file = rootDir.resolve("local.properties")
|
||||
|
||||
if (file.exists()) {
|
||||
file.inputStream().use { props.load(it) }
|
||||
}
|
||||
|
||||
return props.getProperty(name) ?: System.getenv(name)
|
||||
}
|
||||
|
||||
nmcpSettings {
|
||||
centralPortal {
|
||||
username = localProperty("MAVEN_CENTRAL_USER")
|
||||
password = localProperty("MAVEN_CENTRAL_PASS")
|
||||
publishingType = "AUTOMATIC"
|
||||
}
|
||||
}
|
||||
|
||||
include(":composeApp", ":parser", ":daemon", ":tunnel", ":cli", ":client", ":keyring", ":shared")
|
||||
|
||||
Reference in New Issue
Block a user