diff --git a/http/build.gradle.kts b/http/build.gradle.kts new file mode 100644 index 0000000..f3d24c0 --- /dev/null +++ b/http/build.gradle.kts @@ -0,0 +1,59 @@ +plugins { + java + `maven-publish` +} + +fun prop(name: String) = project.rootProject.property(name) as String + +group = prop("group") +version = prop("version") + +repositories { + mavenCentral() +} + +dependencies { + implementation(project(":api")) + compileOnly("io.netty:netty-all:4.1.97.Final") + compileOnly("org.slf4j:slf4j-api:1.7.30") +} + +publishing { + publications { + create("mavenJava") { + artifactId = project.name + from(components["java"]) + + pom { + name = "Inject (HTTP)" + description = "A library for making injecting into Netty easier." + url = "https://mcbrawls.net" + + licenses { + license { + name = "MIT" + url = "https://opensource.org/licenses/MIT" + distribution = "repo" + } + } + } + } + } + + repositories { + runCatching { // getenv throws if variable doesn't exist + val mavenUser = System.getenv("MAVEN_USERNAME_ANDANTE") + val mavenPass = System.getenv("MAVEN_PASSWORD_ANDANTE") + + maven { + name = "Andante" + url = uri("https://maven.andante.dev/releases/") + + credentials { + username = mavenUser + password = mavenPass + } + } + } + } +}