Skip to content

Commit

Permalink
Initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed May 12, 2024
0 parents commit 96828ff
Show file tree
Hide file tree
Showing 18 changed files with 1,392 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-22.04
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Upload Artifacts to GitHub
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Compiled class file
*.class

# Log file
*.log
*.log.gz

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Project files
/.idea/*
!/.idea/copyright/
/.gradle/
/build/
/out/
/run/
6 changes: 6 additions & 0 deletions .idea/copyright/GPL_3_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ViaProxySpark
[ViaProxy](https://github.com/RaphiMC/ViaProxy) plugin which implements the [spark](https://github.com/lucko/spark) profiler.

## Installation and Usage
1. Download the latest version from [GitHub Actions](https://github.com/ViaVersionAddons/ViaProxySpark/actions).
2. Put the jar file into the plugins folder of ViaProxy
3. Run ViaProxy. You should now be able to run spark commands in the console.

## Contact
If you encounter any issues, please report them on the
[issue tracker](https://github.com/ViaVersionAddons/ViaProxySpark/issues).
If you just want to talk or need help using ViaProxySpark feel free to join my
[Discord](https://discord.gg/dCzT9XHEWu).
69 changes: 69 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
plugins {
id "java"
}

base {
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"

group = project.maven_group ?: rootProject.maven_group
archivesName = project.maven_name ?: rootProject.maven_name
version = project.maven_version ?: rootProject.maven_version
}

configurations {
include

implementation.extendsFrom include
api.extendsFrom include
}

repositories {
mavenCentral()
maven {
name = "Sonatype Snapshots"
url = "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
name = "Jitpack"
url = "https://jitpack.io"
}
maven {
name = "ViaVersion"
url "https://repo.viaversion.com"
}
maven {
name = "lucko"
url = "https://repo.lucko.me"
}
}

dependencies {
implementation "net.raphimc:ViaProxy:3.2.1"

include "com.github.AlexProgrammerDE.spark:spark-common:2ba922a171"
}

processResources {
inputs.property "version", project.version

filesMatching("viaproxy.yml") {
expand "version": project.version
}
}

jar {
dependsOn configurations.include
from {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.include.collect {
zipTree(it)
}
} {
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
}

from("LICENSE") {
rename { "${it}_${project.name ?: rootProject.name}" }
}
}
7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true

maven_group=net.raphimc
maven_name=ViaProxySpark
maven_version=1.0.0
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 96828ff

Please sign in to comment.