Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/javasteam-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
with:
name: javasteam-deadlock
path: javasteam-deadlock/build/libs
- uses: actions/upload-artifact@v4
with:
name: javasteam-dota2
path: javasteam-dota2/build/libs
- uses: actions/upload-artifact@v4
with:
name: javasteam-tf
Expand All @@ -55,3 +59,7 @@ jobs:
with:
name: javasteam-depotdownloader
path: javasteam-depotdownloader/build/libs
- uses: actions/upload-artifact@v4
with:
name: javasteam-protobufs-webui
path: javasteam-protobufs-webui/build/libs
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ tasks.jar {
manifest {
attributes["Automatic-Module-Name"] = "in.dragonbra.javasteam"
}
exclude("**/*.proto")
}

/* Tasks */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ProtoParser(private val outputDir: File) {
private companion object {
private const val RPC_PACKAGE = "in.dragonbra.javasteam.rpc"
private const val SERVICE_PACKAGE = "${RPC_PACKAGE}.service"
private const val WEBUI_SERVICE_PACKAGE = "${SERVICE_PACKAGE}.webui"

private val suppressAnnotation = AnnotationSpec
.builder(Suppress::class)
Expand Down Expand Up @@ -249,7 +250,10 @@ class ProtoParser(private val outputDir: File) {
}

// Build everything together and write it
FileSpec.builder(SERVICE_PACKAGE, service.name)
// Services from .proto files under "webui" go to their own sub-package to
// avoid clashing with same-named steamclient services (e.g. Store).
val servicePackage = if (parentPathName == "webui") WEBUI_SERVICE_PACKAGE else SERVICE_PACKAGE
FileSpec.builder(servicePackage, service.name)
.addType(cBuilder.build())
.build()
.writeTo(outputDir)
Expand Down
5 changes: 5 additions & 0 deletions javasteam-cs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ tasks.javadoc {
exclude("**/in/dragonbra/javasteam/protobufs/**")
}

/* Jar */
tasks.jar {
exclude("**/*.proto")
}

dependencies {
implementation(libs.protobuf.java)
}
Expand Down
5 changes: 5 additions & 0 deletions javasteam-deadlock/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ tasks.javadoc {
exclude("**/in/dragonbra/javasteam/protobufs/**")
}

/* Jar */
tasks.jar {
exclude("**/*.proto")
}

dependencies {
implementation(libs.protobuf.java)
}
Expand Down
5 changes: 5 additions & 0 deletions javasteam-dota2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ tasks.javadoc {
exclude("**/in/dragonbra/javasteam/protobufs/**")
}

/* Jar */
tasks.jar {
exclude("**/*.proto")
}

dependencies {
implementation(libs.protobuf.java)
}
Expand Down
1 change: 1 addition & 0 deletions javasteam-protobufs-webui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
142 changes: 142 additions & 0 deletions javasteam-protobufs-webui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask

plugins {
alias(libs.plugins.kotlin.dokka)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.kotlinter)
alias(libs.plugins.protobuf.gradle)
id("maven-publish")
id("signing")
rpcinterfacegen
}

repositories {
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.toVersion(libs.versions.java.get())
targetCompatibility = JavaVersion.toVersion(libs.versions.java.get())
withSourcesJar()
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.java.get()))
}
}

/* Protobufs */
protobuf.protoc {
artifact = libs.protobuf.protoc.get().toString()
}

/* Source Sets */
sourceSets.main {
java.srcDirs(
// builtBy() fixes gradle warning "Execution optimizations have been disabled for task"
files("build/generated/source/javasteam/main/java").builtBy("generateRpcMethods")
)
}

/* Tasks */
tasks["compileJava"].dependsOn("generateRpcMethods")
tasks["compileKotlin"].dependsOn("generateRpcMethods")
tasks["generateRpcMethods"].dependsOn("extractProto", "extractIncludeProto")

/* Testing */
tasks.test {
useJUnitPlatform()
}

/* Java-Kotlin Docs */
dokka {
moduleName.set("JavaSteam")
dokkaSourceSets.main {
suppressGeneratedFiles.set(false) // Allow generated files to be documented.
perPackageOption {
// Deny most of the generated files.
matchingRegex.set("in.dragonbra.javasteam.(protobufs|enums|generated).*")
suppress.set(true)
}
}
}

// Make sure Maven Publishing gets javadoc
val javadocJar by tasks.registering(Jar::class) {
dependsOn(tasks.dokkaGenerate)
archiveClassifier.set("javadoc")
from(layout.buildDirectory.dir("dokka/html"))
}
artifacts {
archives(javadocJar)
}

/* Kotlinter */
tasks.withType<LintTask> {
val generatedFile = "${File.separator}build${File.separator}generated"
exclude { it.file.path.contains(generatedFile) }
}

tasks.withType<FormatTask> {
val generatedFile = "${File.separator}build${File.separator}generated"
exclude { it.file.path.contains(generatedFile) }
}

/* Jar */
tasks.jar {
exclude("**/*.proto")
}

dependencies {
api(rootProject)

implementation(libs.kotlin.coroutines)
implementation(libs.kotlin.stdib)
implementation(libs.protobuf.java)

testImplementation(platform(libs.tests.junit.bom))
testImplementation(libs.tests.junit.jupiter)
testRuntimeOnly(libs.tests.junit.platform)
}

/* Artifact publishing */
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(javadocJar)
pom {
name = "JavaSteam-protobufs-webui"
packaging = "jar"
description = "Webui protobuf classes and services for JavaSteam."
url = "https://github.com/Longi94/JavaSteam"
inceptionYear = "2026"
scm {
connection = "scm:git:git://github.com/Longi94/JavaSteam.git"
developerConnection = "scm:git:ssh://github.com:Longi94/JavaSteam.git"
url = "https://github.com/Longi94/JavaSteam/tree/master"
}
licenses {
license {
name = "MIT License"
url = "https://www.opensource.org/licenses/mit-license.php"
}
}
developers {
developer {
id = "Longi"
name = "Long Tran"
email = "lngtrn94@gmail.com"
}
}
}
}
}
}

signing {
sign(publishing.publications["mavenJava"])
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import `in`.dragonbra.javasteam.protobufs.webui.ServiceClientcomm.CClientComm_In
import `in`.dragonbra.javasteam.protobufs.webui.ServiceClientcomm.CClientComm_LaunchClientApp_Request
import `in`.dragonbra.javasteam.protobufs.webui.ServiceClientcomm.CClientComm_SetClientAppUpdateState_Request
import `in`.dragonbra.javasteam.protobufs.webui.ServiceClientcomm.CClientComm_UninstallClientApp_Request
import `in`.dragonbra.javasteam.rpc.service.ClientComm
import `in`.dragonbra.javasteam.rpc.service.webui.ClientComm
import `in`.dragonbra.javasteam.steam.handlers.ClientMsgHandler
import `in`.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages
import `in`.dragonbra.javasteam.util.JavaSteamAddition
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlin.getValue

/**
* Allows controlling of other running Steam clients.
Expand Down
Loading
Loading