From 8335ff58970cadaebf00892166f5a292131a766e Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 1 Jun 2021 02:54:00 +0800 Subject: Upload to maven --- api/build.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'api') diff --git a/api/build.gradle b/api/build.gradle index 0f2b5e415..28a7b9bc3 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -15,3 +15,22 @@ remapJar { remapAccessWidener.set(false) } } + +java { + withSourcesJar() +} + +publishing { + publications { + mavenCommon(MavenPublication) { + artifactId = rootProject.name + "-" + project.name + artifact remapJar + afterEvaluate { + artifact(remapSourcesJar.output) { + builtBy remapSourcesJar + classifier "sources" + } + } + } + } +} -- cgit