From 4eb102c6e0c4a1b527d84b27be3488c616c3150b Mon Sep 17 00:00:00 2001 From: Elizabeth Popova Date: Sun, 18 Apr 2021 00:25:31 +0300 Subject: [PATCH 1/2] Remove bintray publish configuration --- build.gradle | 1 - sectionedrecyclerview/build.gradle | 4 +- sectionedrecyclerview/publish.gradle | 83 ---------------------------- 3 files changed, 2 insertions(+), 86 deletions(-) delete mode 100644 sectionedrecyclerview/publish.gradle diff --git a/build.gradle b/build.gradle index cc10e64..0eb258d 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/sectionedrecyclerview/build.gradle b/sectionedrecyclerview/build.gradle index e455204..1cd1b66 100644 --- a/sectionedrecyclerview/build.gradle +++ b/sectionedrecyclerview/build.gradle @@ -1,4 +1,6 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' +group = 'com.github.crux-lab' android { compileSdkVersion 30 @@ -21,5 +23,3 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' } - -apply from: 'publish.gradle' diff --git a/sectionedrecyclerview/publish.gradle b/sectionedrecyclerview/publish.gradle deleted file mode 100644 index 1b46620..0000000 --- a/sectionedrecyclerview/publish.gradle +++ /dev/null @@ -1,83 +0,0 @@ -apply plugin: 'maven-publish' -apply plugin: 'com.jfrog.bintray' - -version '1.1.0' -group 'com.cruxlab' - -publishing { - publications { - Production(MavenPublication) { - artifact("$buildDir/outputs/aar/sectionedrecyclerview-release.aar") - groupId - artifactId 'sectionedrecyclerview' - version this.version - - pom.withXml { - def dependenciesNode = asNode().appendNode('dependencies') - - // Iterate over the implementation dependencies (we don't want the test ones), adding a node for each - configurations.implementation.allDependencies.each { - // Ensure dependencies such as fileTree are not included in the pom. - if (it.name != 'unspecified') { - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', it.group) - dependencyNode.appendNode('artifactId', it.name) - dependencyNode.appendNode('version', it.version) - } - } - } - } - } -} - -bintray { - Properties properties = new Properties() - properties.load(project.rootProject.file('local.properties').newDataInputStream()) - user = properties.getProperty('bintrayUser') - key = properties.getProperty('bintrayApiKey') - publications = ['Production'] - configurations = ['archives'] - override = true - pkg { - repo = 'SectionedRecyclerView' - name = 'SectionedRecyclerView' - userOrg = 'cruxlab' - description = "A library that allows using sections with pinnable headers in RecyclerView." - publish = true - publicDownloadNumbers = true - licenses = ['MIT'] - vcsUrl = 'https://github.com/crux-lab/sectioned-recycler-view.git' - dryRun = false - version { - name = this.version - desc = "${this.version}" - released = new Date() - vcsTag = this.version - } - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -task javadoc(type: Javadoc) { - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - android.libraryVariants.all { variant -> - if (variant.name == 'release') { - owner.classpath += variant.javaCompile.classpath - } - } - source = android.sourceSets.main.java.srcDirs -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives javadocJar - archives sourcesJar -} From e1c8a9e85fccfe2f500b3d06dfe9e16a2bd19c6e Mon Sep 17 00:00:00 2001 From: Elizabeth Popova Date: Sun, 18 Apr 2021 01:48:33 +0300 Subject: [PATCH 2/2] Update README.md with jitpack instructions --- README.md | 17 ++++++++++++++--- app/build.gradle | 4 ++-- build.gradle | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5091b6a..0645043 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sectioned RecyclerView with pinnable (floating/sticky) headers -[![Bintray](https://img.shields.io/bintray/v/cruxlab/SectionedRecyclerView/SectionedRecyclerView?color=bright-green)](https://bintray.com/cruxlab/SectionedRecyclerView/SectionedRecyclerView/1.1.0) +[![Jitpack](https://jitpack.io/v/crux-lab/sectioned-recycler-view.svg)](https://jitpack.io/#crux-lab/sectioned-recycler-view) [![Nuget](https://img.shields.io/nuget/v/Karamunting.Android.CruxLab.SectionedRecyclerView?color=bright-green)](https://www.nuget.org/packages/Karamunting.Android.CruxLab.SectionedRecyclerView/1.0.3) [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16) @@ -23,12 +23,23 @@ You can find demo project code [here](https://github.com/crux-lab/sectioned-recy ## Usage ### Setup +1. Add the JitPack repository to your project's `build.gradle` file: -The Gradle dependency is available via [jCenter](https://bintray.com/cruxlab/SectionedRecyclerView/SectionedRecyclerView). Add this to your module's `build.gradle` file: +```gradle +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } +} +``` + +2. Add the dependency to your module's `build.gradle` file: ```gradle -implementation 'com.cruxlab:sectionedrecyclerview:1.1.0' +implementation 'com.github.crux-lab:sectioned-recycler-view:1.1.0' ``` +Note: previously the library was available via jCenter as `com.cruxlab:sectionedrecyclerview:x.y.z`. ### Initialization diff --git a/app/build.gradle b/app/build.gradle index 07c222f..5784ca3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,6 +22,6 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.cruxlab:sectionedrecyclerview:1.1.0' -// implementation project(':sectionedrecyclerview'); +// implementation 'com.github.crux-lab:sectioned-recycler-view:1.1.0' + implementation project(':sectionedrecyclerview'); } diff --git a/build.gradle b/build.gradle index 0eb258d..547e76c 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,7 @@ allprojects { repositories { google() jcenter() + maven { url 'https://jitpack.io' } } }