Skip to content

Commit 62cf23d

Browse files
committed
Switch to publishing to bintray directly
1 parent 2e6c6d7 commit 62cf23d

14 files changed

Lines changed: 205 additions & 8 deletions

File tree

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
buildscript {
44

55
ext.kotlin_version = '1.2.71'
6-
ext.android_plugin_version = '3.2.0'
6+
ext.android_plugin_version = '3.2.1'
77
ext.targetSdkVersion = 28
88
ext.compileSdkVersion = 28
99
ext.minSdkVersion = 14
@@ -19,6 +19,10 @@ buildscript {
1919
dependencies {
2020
classpath "com.android.tools.build:gradle:$android_plugin_version"
2121
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
22+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
23+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
24+
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17"
25+
2226

2327
// NOTE: Do not place your application dependencies here; they belong
2428
// in the individual module build.gradle files
@@ -27,6 +31,7 @@ buildscript {
2731

2832
allprojects {
2933
repositories {
34+
maven { url 'https://dl.bintray.com/lisawray/maven'}
3035
google()
3136
jcenter()
3237
}

example-databinding/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ android {
2626
}
2727

2828
dependencies {
29-
implementation project(':library-databinding')
29+
//implementation project(':library-databinding')
30+
implementation 'com.xwray:groupie-databinding:2.2.0'
3031
implementation project(':example-shared')
3132
implementation "androidx.appcompat:appcompat:1.0.0"
3233
implementation "com.google.android.material:material:1.0.0"

example-shared/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ android {
2121
}
2222

2323
dependencies {
24-
api project (':library')
24+
//api project (':library')
25+
api 'com.xwray:groupie:2.2.0'
2526
api "androidx.recyclerview:recyclerview:1.0.0"
2627
api "androidx.appcompat:appcompat:1.0.0"
2728
api "com.google.android.material:material:1.0.0"

example/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ android {
3939

4040
dependencies {
4141
implementation project(':example-shared')
42-
implementation project(':library')
43-
implementation project(':library-kotlin-android-extensions')
42+
//implementation project(':library')
43+
//implementation project(':library-kotlin-android-extensions')
44+
implementation 'com.xwray:groupie-kotlin-android-extensions:2.2.0'
45+
4446
}
4547

4648
repositories {

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip

jcenter/bintray.gradle

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
apply plugin: 'com.jfrog.bintray'
2+
3+
version = libraryVersion
4+
5+
if (project.hasProperty("android")) { // Android libraries
6+
task sourcesJar(type: Jar) {
7+
classifier = 'sources'
8+
from android.sourceSets.main.java.srcDirs
9+
}
10+
11+
task javadoc(type: Javadoc) {
12+
source = android.sourceSets.main.java.srcDirs
13+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
14+
}
15+
16+
apply plugin: "org.jetbrains.dokka-android"
17+
task dokkaJavadoc(type: dokka.getClass()) {
18+
outputFormat = 'javadoc'
19+
outputDirectory = "$buildDir/javadoc"
20+
}
21+
22+
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
23+
classifier = 'javadoc'
24+
from "$buildDir/javadoc"
25+
}
26+
} else { // Java libraries
27+
task sourcesJar(type: Jar, dependsOn: classes) {
28+
classifier = 'sources'
29+
from sourceSets.main.allSource
30+
}
31+
32+
apply plugin: "org.jetbrains.dokka"
33+
task dokkaJavadoc(type: dokka.getClass()) {
34+
outputFormat = 'javadoc'
35+
outputDirectory = "$buildDir/javadoc"
36+
}
37+
38+
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
39+
classifier = 'javadoc'
40+
from "$buildDir/javadoc"
41+
}
42+
}
43+
44+
bintrayUpload.dependsOn assemble
45+
bintrayUpload.dependsOn sourcesJar
46+
bintrayUpload.dependsOn javadocJar
47+
48+
artifacts {
49+
archives javadocJar
50+
archives sourcesJar
51+
}
52+
53+
Properties properties = new Properties()
54+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
55+
56+
bintray {
57+
user = properties.getProperty("bintray.user")
58+
key = properties.getProperty("bintray.apikey")
59+
60+
configurations = ['archives']
61+
pkg {
62+
repo = bintrayRepo
63+
name = bintrayName
64+
desc = libraryDescription
65+
66+
websiteUrl = siteUrl
67+
vcsUrl = gitUrl
68+
licenses = allLicenses
69+
publish = true
70+
publicDownloadNumbers = true
71+
version {
72+
desc = libraryDescription
73+
gpg {
74+
sign = false
75+
}
76+
}
77+
}
78+
}

jcenter/maven-install.gradle

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apply plugin: 'com.github.dcendents.android-maven'
2+
3+
group = publishedGroupId // Maven Group ID for the artifact
4+
5+
install {
6+
repositories.mavenInstaller {
7+
// This generates POM.xml with proper parameters
8+
pom.project {
9+
packaging packagingType
10+
groupId publishedGroupId
11+
artifactId artifact
12+
13+
// Add your description here
14+
name libraryName
15+
description libraryDescription
16+
url siteUrl
17+
18+
// Set your license
19+
licenses {
20+
license {
21+
name licenseName
22+
url licenseUrl
23+
}
24+
}
25+
developers {
26+
developer {
27+
id developerId
28+
name developerName
29+
email developerEmail
30+
}
31+
}
32+
scm {
33+
connection gitUrl
34+
developerConnection gitUrl
35+
url siteUrl
36+
}
37+
38+
// Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
39+
def deps = configurations.compile.allDependencies + configurations.implementation.allDependencies
40+
deps.each {
41+
dependencies.add("compile", it)
42+
}
43+
44+
}
45+
}
46+
}

library-databinding/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ buildscript {
66
}
77
}
88

9+
archivesBaseName = 'groupie-databinding'
10+
911
android {
1012
compileSdkVersion rootProject.compileSdkVersion
1113

@@ -27,7 +29,7 @@ android {
2729
}
2830

2931
dependencies {
30-
implementation project(':library')
32+
compileOnly project(':library')
3133
compileOnly "androidx.recyclerview:recyclerview:1.0.0"
3234
compileOnly("androidx.databinding:databinding-runtime:$databinding_version") {
3335
transitive = false
@@ -38,3 +40,6 @@ dependencies {
3840
compileOnly("androidx.recyclerview:recyclerview:1.0.0")
3941
compileOnly("androidx.annotation:annotation:1.0.0")
4042
}
43+
44+
apply from: rootProject.file('release-bintray.gradle')
45+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
POM_NAME=groupie-databinding
2+
POM_DESCRIPTION=Library to help with complex RecyclerViews
3+
POM_BINTRAY_NAME=groupie-databinding
4+
POM_ARTIFACT_ID=groupie-databinding
5+
POM_PACKAGING=aar
6+
POM_VERSION=2.2.0

library-kotlin-android-extensions/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ buildscript {
1212
}
1313
}
1414

15+
archivesBaseName = 'groupie-kotlin-android-extensions'
16+
1517
androidExtensions {
1618
experimental = true
1719
}
@@ -39,7 +41,7 @@ android {
3941
}
4042

4143
dependencies {
42-
implementation project(':library')
44+
compileOnly project(':library')
4345
compileOnly "androidx.recyclerview:recyclerview:1.0.0"
4446
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
4547
}
@@ -51,3 +53,5 @@ repositories {
5153
tasks.withType(Javadoc).all {
5254
enabled = false
5355
}
56+
57+
apply from: rootProject.file('release-bintray.gradle')

0 commit comments

Comments
 (0)