mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-05-31 17:31:55 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 827851d4cc | |||
|
775d29114a
|
|||
| ee07deb68f | |||
| 1acdfe8c4b | |||
| 57109e4c97 |
@@ -5,6 +5,8 @@ jobs:
|
||||
build-and-release:
|
||||
name: Build and Release
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStoreType=JKS -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStorePassword=changeit
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Set up JDK 21
|
||||
@@ -15,15 +17,15 @@ jobs:
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: 'wrapper'
|
||||
gradle-version: '9.4.1'
|
||||
- name: Build
|
||||
run: ./gradlew build --no-daemon
|
||||
run: gradle build --no-daemon
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get Version Number from Gradle
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(./gradlew properties -q | awk -F': ' '/^version:/ {print $2; exit}')
|
||||
VERSION=$(gradle properties -q | awk -F': ' '/^version:/ {print $2; exit}')
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||
- name: Extract latest CHANGELOG entry
|
||||
id: changelog
|
||||
@@ -52,3 +54,18 @@ jobs:
|
||||
asset_path: ./build/libs/AntiVPN-${{ env.VERSION }}-universal.jar
|
||||
asset_name: AntiVPN-v${{ env.VERSION }}.jar
|
||||
asset_content_type: application/java-archive
|
||||
- name: Upload to Hangar
|
||||
uses: benwoo1110/hangar-upload-action@v1
|
||||
with:
|
||||
api_token: ${{ secrets.HANGAR_API_TOKEN }}
|
||||
slug: AntiVPN
|
||||
version: ${{ env.VERSION }}
|
||||
channel: release
|
||||
files: |
|
||||
[
|
||||
{
|
||||
"path": "./build/libs/AntiVPN-${{ env.VERSION }}-universal.jar",
|
||||
"platforms": ["PAPER", "VELOCITY", "WATERFALL"]
|
||||
}
|
||||
]
|
||||
description: ${{ steps.changelog.outputs.content }}
|
||||
|
||||
@@ -9,6 +9,8 @@ jobs:
|
||||
build:
|
||||
name: Build and Test
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStoreType=JKS -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStorePassword=changeit
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
@@ -20,9 +22,9 @@ jobs:
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: 'wrapper'
|
||||
gradle-version: '9.4.1'
|
||||
- name: Build
|
||||
run: ./gradlew build --no-daemon
|
||||
run: gradle build --no-daemon
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Upload AntiVPN
|
||||
|
||||
@@ -4,6 +4,8 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStoreType=JKS -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStorePassword=changeit
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
@@ -15,8 +17,28 @@ jobs:
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: 'wrapper'
|
||||
gradle-version: '9.4.1'
|
||||
- name: Build
|
||||
run: ./gradlew build --no-daemon
|
||||
run: gradle build -x test --no-daemon
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStoreType=JKS -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStorePassword=changeit
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'zulu'
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.4.1'
|
||||
- name: Build and Test
|
||||
run: gradle build --no-daemon
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
evaluationDependsOn(':Bukkit:Plugin')
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':Common:Source')
|
||||
compileOnly project(':Common:loader-utils')
|
||||
implementation project(':Common:Source')
|
||||
implementation project(':Common:loader-utils')
|
||||
implementation 'org.bstats:bstats-bukkit:2.2.1'
|
||||
testImplementation 'com.github.seeseemelk:MockBukkit-v1.20:3.84.0'
|
||||
testImplementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
testImplementation 'org.mockito:mockito-core:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-subclass:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
@@ -15,4 +20,9 @@ shadowJar {
|
||||
relocate 'org.yaml.snakeyaml', 'dev.brighten.antivpn.shaded.org.yaml.snakeyaml'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
systemProperty 'mockito.mockmaker', 'subclass'
|
||||
}
|
||||
|
||||
tasks.build.dependsOn shadowJar
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
evaluationDependsOn(':Bungee:BungeePlugin')
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'net.md-5:bungeecord-api:1.21-R0.2'
|
||||
compileOnly project(':Common:Source')
|
||||
compileOnly project(':Common:loader-utils')
|
||||
testImplementation 'net.md-5:bungeecord-api:1.21-R0.2'
|
||||
implementation project(':Common:Source')
|
||||
implementation project(':Common:loader-utils')
|
||||
implementation 'org.bstats:bstats-bungeecord:2.2.1'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
|
||||
testImplementation 'org.mockito:mockito-core:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-subclass:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
|
||||
testImplementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
}
|
||||
tasks.compileJava.dependsOn(':Common:Source:jar')
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
systemProperty 'mockito.mockmaker', 'subclass'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -12,6 +12,18 @@ dependencies {
|
||||
compileOnly 'com.h2database:h2:2.2.220'
|
||||
compileOnly 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
compileOnly 'org.mongodb:mongo-java-driver:3.12.14'
|
||||
|
||||
testImplementation 'org.mockito:mockito-core:5.11.0'
|
||||
testImplementation "org.junit.jupiter:junit-jupiter:5.8.1"
|
||||
testImplementation "org.testcontainers:testcontainers:2.0.4"
|
||||
testImplementation "org.testcontainers:testcontainers-junit-jupiter:2.0.4"
|
||||
testImplementation 'org.testcontainers:mysql:1.20.4'
|
||||
testImplementation 'org.testcontainers:mongodb:1.20.4'
|
||||
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.16'
|
||||
testImplementation 'com.mysql:mysql-connector-j:9.3.0'
|
||||
testImplementation 'com.h2database:h2:2.2.220'
|
||||
testImplementation 'org.mongodb:mongo-java-driver:3.12.14'
|
||||
testImplementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
@@ -31,3 +43,15 @@ shadowJar {
|
||||
}
|
||||
|
||||
tasks.build.dependsOn shadowJar
|
||||
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
|
||||
skip()
|
||||
}
|
||||
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveClassifier.set('raw')
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
evaluationDependsOn(':Sponge:SpongePlugin')
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spongepowered:spongeapi:11.0.0'
|
||||
testImplementation 'org.spongepowered:spongeapi:11.0.0'
|
||||
compileOnly project(':Common:Source')
|
||||
testImplementation project(':Common:Source')
|
||||
compileOnly project(':Common:loader-utils')
|
||||
testImplementation project(':Common:loader-utils')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
|
||||
testImplementation 'org.mockito:mockito-core:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-subclass:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
|
||||
testImplementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
}
|
||||
tasks.compileJava.dependsOn(':Common:Source:jar')
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
systemProperty 'mockito.mockmaker', 'subclass'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
}
|
||||
|
||||
// Aggregate universal jar that embeds platform loaders and the common source jar
|
||||
|
||||
evaluationDependsOn(':Common:Source')
|
||||
|
||||
dependencies {
|
||||
implementation project(':Bukkit:Loader')
|
||||
implementation project(':Velocity:VelocityLoader')
|
||||
implementation project(':Bungee:BungeeLoader')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveClassifier.set('')
|
||||
archiveBaseName.set("AntiVPN-${project.version}-universal")
|
||||
|
||||
// Include the shaded Common:Source jar as a single resource
|
||||
from(project(':Common:Source').tasks.shadowJar) {
|
||||
rename { 'antivpn-source.jarinjar' }
|
||||
}
|
||||
|
||||
relocate 'org.yaml.snakeyaml', 'dev.brighten.antivpn.shaded.org.yaml.snakeyaml'
|
||||
relocate 'org.bstats', 'dev.brighten.antivpn.shaded.org.bstats'
|
||||
relocate 'org.objectweb', 'dev.brighten.antivpn.shaded.org.objectweb'
|
||||
}
|
||||
|
||||
tasks.named('shadowJar') {
|
||||
dependsOn(':Common:Source:shadowJar')
|
||||
dependsOn(':Bukkit:Loader:shadowJar')
|
||||
dependsOn(':Velocity:VelocityLoader:shadowJar')
|
||||
dependsOn(':Bungee:BungeeLoader:shadowJar')
|
||||
}
|
||||
|
||||
tasks.build.dependsOn shadowJar
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
evaluationDependsOn(':Velocity:VelocityPlugin')
|
||||
@@ -8,6 +8,7 @@ dependencies {
|
||||
compileOnly 'com.velocitypowered:velocity-api:3.4.0-SNAPSHOT'
|
||||
compileOnly project(':Velocity:VelocityPlugin')
|
||||
implementation project(':Common:loader-utils')
|
||||
implementation 'org.bstats:bstats-velocity:2.2.1'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.velocitypowered:velocity-api:3.4.0-SNAPSHOT'
|
||||
testImplementation 'com.velocitypowered:velocity-api:3.4.0-SNAPSHOT'
|
||||
compileOnly project(':Common:Source')
|
||||
compileOnly project(':Common:loader-utils')
|
||||
implementation 'org.bstats:bstats-velocity:2.2.1'
|
||||
testImplementation 'org.mockito:mockito-core:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
|
||||
testImplementation 'net.java.dev.jna:jna:5.14.0'
|
||||
testImplementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
|
||||
testImplementation project(':Common:Source')
|
||||
testImplementation project(':Common:loader-utils')
|
||||
}
|
||||
tasks.compileJava.dependsOn(':Common:Source:jar')
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
jvmArgs("-XX:+EnableDynamicAgentLoading")
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
||||
+70
-4
@@ -1,19 +1,29 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||
id 'com.gradleup.shadow' version '9.4.1'
|
||||
}
|
||||
|
||||
def aggregateTestProjects = [
|
||||
project(':Common:Source'),
|
||||
project(':Bukkit:Plugin'),
|
||||
project(':Bungee:BungeePlugin'),
|
||||
project(':Sponge:SpongePlugin'),
|
||||
project(':Velocity:VelocityPlugin')
|
||||
]
|
||||
|
||||
allprojects {
|
||||
group = 'dev.brighten.antivpn'
|
||||
version = '1.10.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.papermc.io/repository/maven-public/' }
|
||||
maven { url 'https://nexus.funkemunky.cc/repository/papermc-public/' }
|
||||
maven { url 'https://nexus.funkemunky.cc/repository/maven-public/' }
|
||||
maven { url 'https://nexus.funkemunky.cc/repository/maven-central/' }
|
||||
maven { url 'https://nexus.funkemunky.cc/content/repositories/releases/' }
|
||||
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||
maven { url 'https://repo.spongepowered.org/repository/maven-public/' }
|
||||
maven { url 'https://repo.velocitypowered.com/releases/' }
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
@@ -21,7 +31,7 @@ allprojects {
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,5 +43,61 @@ allprojects {
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.18.44'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.44'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
systemProperty 'mockito.mockmaker', 'subclass'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.junit.platform:junit-platform-suite:1.11.4'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
compileClasspath += files(aggregateTestProjects.collect { it.sourceSets.test.output + it.sourceSets.test.compileClasspath })
|
||||
runtimeClasspath += files(aggregateTestProjects.collect { it.sourceSets.test.output + it.sourceSets.test.runtimeClasspath })
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('test') {
|
||||
dependsOn(aggregateTestProjects.collect { it.tasks.named('testClasses') })
|
||||
jvmArgs("-XX:+EnableDynamicAgentLoading")
|
||||
}
|
||||
|
||||
evaluationDependsOn(':Common:Source')
|
||||
evaluationDependsOn(':Bukkit:Loader')
|
||||
evaluationDependsOn(':Velocity:VelocityLoader')
|
||||
evaluationDependsOn(':Bungee:BungeeLoader')
|
||||
|
||||
dependencies {
|
||||
implementation project(':Bukkit:Loader')
|
||||
implementation project(':Velocity:VelocityLoader')
|
||||
implementation project(':Bungee:BungeeLoader')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("AntiVPN-${project.version}-universal.jar")
|
||||
|
||||
// Include the shaded Common:Source jar as a single resource
|
||||
from(project(':Common:Source').tasks.shadowJar) {
|
||||
rename { 'antivpn-source.jarinjar' }
|
||||
}
|
||||
|
||||
relocate 'org.yaml.snakeyaml', 'dev.brighten.antivpn.shaded.org.yaml.snakeyaml'
|
||||
relocate 'org.bstats', 'dev.brighten.antivpn.shaded.org.bstats'
|
||||
relocate 'org.objectweb', 'dev.brighten.antivpn.shaded.org.objectweb'
|
||||
}
|
||||
|
||||
tasks.named('shadowJar') {
|
||||
dependsOn(':Common:Source:shadowJar')
|
||||
dependsOn(':Bukkit:Loader:shadowJar')
|
||||
dependsOn(':Velocity:VelocityLoader:shadowJar')
|
||||
dependsOn(':Bungee:BungeeLoader:shadowJar')
|
||||
}
|
||||
|
||||
tasks.build.dependsOn shadowJar
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
systemProp.javax.net.ssl.trustStore=NONE
|
||||
systemProp.javax.net.ssl.trustStoreType=Windows-ROOT
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ include 'Sponge:SpongeLoader'
|
||||
include 'Velocity:VelocityPlugin'
|
||||
include 'Velocity:VelocityLoader'
|
||||
|
||||
include 'Universal'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user