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
526 changes: 367 additions & 159 deletions LICENSE

Large diffs are not rendered by default.

48 changes: 1 addition & 47 deletions buildSrc/src/main/kotlin/kotlin-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
plugins {
alias(libs.plugins.kotlin.jvm)

alias(libs.plugins.vanniktech.maven.publish)
signing
}

group = providers.gradleProperty("group").get()
version = providers.gradleProperty("version").get()
description = providers.gradleProperty("description").get()

repositories {
maven("https://repo.papermc.io/repository/maven-public/")
Expand All @@ -25,47 +23,3 @@ tasks.test {
kotlin {
jvmToolchain(21)
}

signing {
useGpgCmd()
}

mavenPublishing {
publishToMavenCentral()
signAllPublications()

pom {
val repoUrl = "github.com/epserv-ru/proxy-check-api"

name = "Kotlin/JVM implementation of proxycheck.io API spec"
url = repoUrl

licenses {
license {
name = "LGPL-3.0-or-later"
url = "https://$repoUrl/blob/main/LICENSE"
distribution = "repo"
}
}

issueManagement {
system = "GitHub"
url = "https://$repoUrl/issues"
}

developers {
developer {
id = "metabrixkt"
name = "metabrix"
email = "admin@epserv.ru"
url = "https://github.com/metabrixkt"
}
}

scm {
url = "https://$repoUrl"
connection = "scm:git:ssh://$repoUrl.git"
developerConnection = connection
}
}
}
34 changes: 34 additions & 0 deletions buildSrc/src/main/kotlin/licensing-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import com.diffplug.gradle.spotless.FormatExtension
import com.diffplug.spotless.generic.LicenseHeaderStep
import com.diffplug.spotless.kotlin.KotlinConstants

plugins {
alias(libs.plugins.spotless)
}

spotless {
kotlin {
target("src/**/*.kt")
setupLicensing(this, KotlinConstants.LICENSE_HEADER_DELIMITER)
}

kotlinGradle {
target("*.gradle.kts")
setupLicensing(this, "(${KotlinConstants.LICENSE_HEADER_DELIMITER}|plugins \\{)")
}
}

fun setupLicensing(extension: FormatExtension, headerDelimiter: String) {
extension.addStep(
LicenseHeaderStep
.headerDelimiter(
providers
.fileContents(rootProject.layout.projectDirectory.file("config/license-header.txt"))
.asText
.map { it.trimEnd() + "\n\n" }::get,
headerDelimiter,
)
.withYearMode(LicenseHeaderStep.YearMode.SET_FROM_GIT)
.build(),
)
}
50 changes: 50 additions & 0 deletions buildSrc/src/main/kotlin/publishing-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
plugins {
alias(libs.plugins.vanniktech.maven.publish)
signing
}

signing {
useGpgCmd()
}

mavenPublishing {
publishToMavenCentral()
signAllPublications()

pom {
val repoUrl = "github.com/epserv-ru/proxy-check-api"

name = project.name
description = project.description
url = "https://$repoUrl"
inceptionYear = "2026"

licenses {
license {
name = "Mozilla Public License 2.0"
url = "https://$repoUrl/blob/main/LICENSE"
distribution = "repo"
}
}

issueManagement {
system = "GitHub"
url = "https://$repoUrl/issues"
}

developers {
developer {
id = "metabrixkt"
name = "metabrix"
email = "admin@epserv.ru"
url = "https://github.com/metabrixkt"
}
}

scm {
url = "https://$repoUrl"
connection = "scm:git:ssh://git@$repoUrl.git"
developerConnection = connection
}
}
}
4 changes: 4 additions & 0 deletions config/license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
* Copyright (c) $YEAR ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
group = ru.epserv.proxycheck
version = 1.0.0-SNAPSHOT
description = Kotlin implementation of proxycheck.io API spec

org.gradle.parallel = true
org.gradle.caching = true
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ mojang-serialization = { module = "com.mojang:datafixerupper", version = "9.0.19
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
paperweight-patcher = { id = "io.papermc.paperweight.patcher", version = "2.0.0-beta.19" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version = "0.36.0" }
spotless = { id = "com.diffplug.spotless", version = "8.2.1" }
7 changes: 7 additions & 0 deletions v3/api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

plugins {
`kotlin-conventions`
`licensing-conventions`
`publishing-conventions`
}

group = "${rootProject.group}.v3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api

import kotlinx.coroutines.future.await
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api

import org.jetbrains.annotations.ApiStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.common

import com.mojang.datafixers.util.Either
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.common

import org.jetbrains.annotations.ApiStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.request

import org.jetbrains.annotations.ApiStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.request

import org.jetbrains.annotations.ApiStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import org.jetbrains.annotations.ApiStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.datafixers.util.Either
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.model.response

import com.mojang.serialization.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.util

import com.mojang.datafixers.kinds.App
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.util

import java.net.Inet4Address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.util

import org.jetbrains.annotations.ApiStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2025-2026 ElectroPlay
* SPDX-License-Identifier: MPL-2.0
*/

package ru.epserv.proxycheck.v3.api.util.codec

import com.mojang.serialization.Codec
Expand Down
Loading