From 1fcf149dbab3b1f3a3fe3ac46eee2145f4b0fa6a Mon Sep 17 00:00:00 2001 From: "tsur.y" Date: Thu, 9 May 2024 12:55:28 +0300 Subject: [PATCH] maven publication --- swipeablerv/build.gradle | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/swipeablerv/build.gradle b/swipeablerv/build.gradle index c4dbfd3..d2c149b 100644 --- a/swipeablerv/build.gradle +++ b/swipeablerv/build.gradle @@ -1,16 +1,15 @@ apply plugin: 'com.android.library' +apply plugin: 'maven-publish' android { compileSdkVersion 29 buildToolsVersion "29.0.2" - defaultConfig { minSdkVersion 21 targetSdkVersion 29 versionCode 1 versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' } @@ -21,15 +20,29 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'androidx.recyclerview:recyclerview:1.1.0' } + +// Define the Maven publication +publishing { + publications { + mavenJava(MavenPublication) { + from components.findByName('release') + groupId = 'com.github.tsuryo' + artifactId = 'swipeablerv' + version = '1.2' + } + } + + repositories { + mavenLocal() // Publish to local Maven repository + } +}