From dc48eb97f98d83e44d7967d934576c785eb60e65 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Wed, 23 Sep 2020 01:03:18 -0400 Subject: [PATCH] Start publishing velocity-natives module Note that this will remain internal API for Velocity and the publication of the module does not necessarily indicate that they will be stable. --- api/build.gradle | 1 + gradle/publish.gradle | 16 ++++++++++++++++ native/build.gradle | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 gradle/publish.gradle diff --git a/api/build.gradle b/api/build.gradle index 4a275b55f..25142d71a 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -5,6 +5,7 @@ plugins { } apply from: '../gradle/checkstyle.gradle' +apply from: '../gradle/publish.gradle' apply plugin: 'com.github.johnrengelman.shadow' sourceSets { diff --git a/gradle/publish.gradle b/gradle/publish.gradle new file mode 100644 index 000000000..cb94e0aa1 --- /dev/null +++ b/gradle/publish.gradle @@ -0,0 +1,16 @@ +publishing { + repositories { + maven { + credentials { + username System.getenv("NEXUS_USERNAME") + password System.getenv("NEXUS_PASSWORD") + } + + name = 'velocity-nexus' + def base = 'https://nexus.velocitypowered.com/repository/velocity-artifacts' + def releasesRepoUrl = "$base-releases/" + def snapshotsRepoUrl = "$base-snapshots/" + url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + } + } +} \ No newline at end of file diff --git a/native/build.gradle b/native/build.gradle index 72ed54609..9d0ec17f6 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -1,9 +1,11 @@ plugins { id 'java-library' id 'checkstyle' + id 'maven-publish' } apply from: '../gradle/checkstyle.gradle' +apply from: '../gradle/publish.gradle' dependencies { implementation "com.google.guava:guava:${guavaVersion}"