From 468bd444e713c06911cc200cbd2f0f0fcfef65c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Rutkowski?= Date: Sun, 29 Oct 2023 16:28:25 +0100 Subject: [PATCH] Enable maven publishing --- .idea/gradle.xml | 4 ++-- build.gradle | 2 +- library/build.gradle | 13 ++++++------- sample/build.gradle | 1 - 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index f325394..a719abd 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,10 +4,11 @@ diff --git a/build.gradle b/build.gradle index 9e68e50..b241d14 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,6 @@ allprojects { } } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } diff --git a/library/build.gradle b/library/build.gradle index b4b55d1..eacd2f7 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -26,14 +26,13 @@ android { } } -/* project.afterEvaluate { publishing { publications { aar(MavenPublication) { groupId = 'com.github.Tunous' artifactId = 'SwipeActionView' - version = '1.4.0-SNAPSHOT' + version = '1.5.0-SNAPSHOT' artifact bundleReleaseAar artifact sourcesJar @@ -41,26 +40,26 @@ project.afterEvaluate { } } } -}*/ +} dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } - -task sourcesJar(type: Jar) { +tasks.register('sourcesJar', Jar) { from android.sourceSets.main.java.srcDirs archiveClassifier = 'sources' } -task javadoc(type: Javadoc) { +tasks.register('javadoc', Javadoc) { failOnError false source = android.sourceSets.main.java.sourceFiles classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) } -task javadocJar(type: Jar, dependsOn: javadoc) { +tasks.register('javadocJar', Jar) { + dependsOn javadoc archiveClassifier = 'javadoc' from javadoc.destinationDir } diff --git a/sample/build.gradle b/sample/build.gradle index 6b718f2..d57387d 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,7 +1,6 @@ plugins { id 'com.android.application' id 'kotlin-android' - //id 'maven-publish' }