From d5a3364c6d178e936d3ef1a6992adf74dc07a4b6 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Tue, 10 Jan 2023 22:30:00 +0800 Subject: [PATCH] Fix publish --- api/build.gradle.kts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 2bfcf6c..ed9dfdb 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -24,11 +24,19 @@ android { targetCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7 } + + publishing { + singleVariant("release") { + withSourcesJar() + withJavadocJar() + } + } } publishing { publications { - fun MavenPublication.setup() { + register("api") { + artifactId = "api" group = "io.github.libxposed" version = "100" pom { @@ -52,10 +60,9 @@ publishing { url.set("https://github.com/libxposed/api") } } - } - register("api") { - artifactId = "api" - setup() + afterEvaluate { + from(components.getByName("release")) + } } } repositories {