Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

Commit 163603f

Browse files
CI fixes
1 parent 0cdf53c commit 163603f

3 files changed

Lines changed: 10 additions & 16 deletions

File tree

.github/workflows/publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
- name: Release build
3333
run: ./gradlew :drag-drop-swipe-recyclerview:assembleRelease
3434

35-
- name: Get artifact
36-
run: ./gradlew androidSourcesJar
37-
3835
- name: Publish to MavenCentral
3936
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
4037
env:

drag-drop-swipe-recyclerview/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'maven-publish'
34

45
android {
56
compileSdk 34
@@ -23,6 +24,13 @@ android {
2324
targetCompatibility JavaVersion.VERSION_17
2425
}
2526

27+
publishing {
28+
singleVariant("release") {
29+
withSourcesJar()
30+
withJavadocJar()
31+
}
32+
}
33+
2634
namespace 'com.ernestoyaquello.dragdropswiperecyclerview'
2735
}
2836

scripts/publish-module.gradle

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
apply plugin: 'maven-publish'
22
apply plugin: 'signing'
33

4-
task androidSourcesJar(type: Jar) {
5-
archiveClassifier.set('sources')
6-
from android.sourceSets.main.java.srcDirs
7-
from android.sourceSets.main.kotlin.srcDirs
8-
}
9-
10-
artifacts {
11-
archives androidSourcesJar
12-
}
13-
144
group = PUBLISH_GROUP_ID
155
version = PUBLISH_VERSION
166

177
afterEvaluate {
188
publishing {
199
publications {
2010
release(MavenPublication) {
11+
from components.release
12+
2113
groupId PUBLISH_GROUP_ID
2214
artifactId PUBLISH_ARTIFACT_ID
2315
version PUBLISH_VERSION
2416

25-
from components.release
26-
artifact androidSourcesJar
27-
2817
pom {
2918
name = PUBLISH_ARTIFACT_ID
3019
description = 'Kotlin Android library that extends RecyclerView to support gestures like drag, drop and swipe, among others. It works with vertical, horizontal and grid lists.'

0 commit comments

Comments
 (0)