From 7328bea8dddf4916e47797490f6963a4f9d72fb1 Mon Sep 17 00:00:00 2001 From: David Jeong Date: Wed, 6 Sep 2023 18:19:44 +0900 Subject: [PATCH] Add configuration for maven-publish (#8) Signed-off-by: Hayoung Jeong --- ariesframework/build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ariesframework/build.gradle b/ariesframework/build.gradle index e53b4b1..5523374 100644 --- a/ariesframework/build.gradle +++ b/ariesframework/build.gradle @@ -4,6 +4,7 @@ plugins { id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.10' id "org.jlleitschuh.gradle.ktlint" version '11.4.2' id 'de.undercouch.download' version '5.4.0' + id 'maven-publish' } task downloadIndyLibs(type: Download) { @@ -17,6 +18,7 @@ task unzipIndyLibs(type: Copy) { into 'src/main' } preBuild.dependsOn unzipIndyLibs +runKtlintCheckOverMainSourceSet.dependsOn unzipIndyLibs android { namespace 'org.hyperledger.ariesframework' @@ -43,6 +45,11 @@ android { kotlinOptions { jvmTarget = '11' } + publishing { + singleVariant("release") { + withSourcesJar() + } + } } ktlint { @@ -73,4 +80,17 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.0" +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId 'org.hyperledger' + artifactId 'aries-framework-kotlin' + version '1.0.0' + } + } + } } \ No newline at end of file