Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 8ec18e2

Browse files
committed
Update bintray config
1 parent e047694 commit 8ec18e2

File tree

4 files changed

+96
-158
lines changed

4 files changed

+96
-158
lines changed

bintray.gradle

Lines changed: 0 additions & 67 deletions
This file was deleted.

install.gradle

Lines changed: 0 additions & 41 deletions
This file was deleted.

multi-view-adapter-databinding/build.gradle

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
*/
1616

1717
apply plugin: 'com.android.library'
18+
apply plugin: 'com.novoda.bintray-release'
1819

19-
def devPropertiesFile = rootProject.file("developer.properties");
20-
def devProperties = new Properties()
21-
devProperties.load(new FileInputStream(devPropertiesFile))
20+
buildscript {
21+
repositories {
22+
jcenter()
23+
}
24+
dependencies {
25+
classpath 'com.novoda:bintray-release:0.5.0'
26+
}
27+
}
2228

2329
android {
2430
compileSdkVersion 25
@@ -50,30 +56,47 @@ dependencies {
5056
}
5157
}
5258

53-
ext {
54-
55-
bintrayRepo = devProperties['repoName']
56-
bintrayName = devProperties['artifactId']
57-
58-
publishedGroupId = devProperties['groupId']
59-
libraryName = devProperties['repoName']
60-
artifact = devProperties['artifactIdDataBinding']
61-
62-
libraryDescription = 'Additional DataBinding support for MultiViewAdapter'
63-
64-
siteUrl = 'https://github.com/DevAhamed/MultiViewAdapter'
65-
gitUrl = 'https://github.com/DevAhamed/MultiViewAdapter.git'
59+
publish {
60+
userOrg = 'devahamed'
61+
groupId = 'com.github.devahamed'
62+
artifactId = 'multi-view-adapter-databinding'
63+
publishVersion = '1.2.0'
64+
repoName = 'MultiViewAdapter'
65+
desc = 'Additional DataBinding support for MultiViewAdapter'
66+
website = 'https://github.com/DevAhamed/MultiViewAdapter'
67+
}
6668

67-
libraryVersion = '1.1.0'
69+
if (project.hasProperty("android")) {
70+
// Android libraries
71+
task sourcesJar(type: Jar) {
72+
classifier = 'sources'
73+
from android.sourceSets.main.java.srcDirs
74+
}
6875

69-
developerId = devProperties['devId']
70-
developerName = devProperties['devName']
71-
developerEmail = devProperties['devEmail']
76+
task javadoc(type: Javadoc) {
77+
source = android.sourceSets.main.java.srcDirs
78+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
79+
failOnError true
80+
}
81+
afterEvaluate {
82+
javadoc.classpath +=
83+
files(android.libraryVariants.collect { variant -> variant.javaCompile.classpath.files
84+
})
85+
}
86+
} else {
87+
// Java libraries
88+
task sourcesJar(type: Jar, dependsOn: classes) {
89+
classifier = 'sources'
90+
from sourceSets.main.allSource
91+
}
92+
}
7293

73-
licenseName = 'The Apache Software License, Version 2.0'
74-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
75-
allLicenses = ["Apache-2.0"]
94+
task javadocJar(type: Jar, dependsOn: javadoc) {
95+
classifier = 'javadoc'
96+
from javadoc.destinationDir
7697
}
7798

78-
apply from: '../install.gradle'
79-
apply from: '../bintray.gradle'
99+
artifacts {
100+
archives javadocJar
101+
archives sourcesJar
102+
}

multi-view-adapter/build.gradle

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
*/
1616

1717
apply plugin: 'com.android.library'
18+
apply plugin: 'com.novoda.bintray-release'
1819

19-
def devPropertiesFile = rootProject.file("developer.properties");
20-
def devProperties = new Properties()
21-
devProperties.load(new FileInputStream(devPropertiesFile))
20+
buildscript {
21+
repositories {
22+
jcenter()
23+
}
24+
dependencies {
25+
classpath 'com.novoda:bintray-release:0.5.0'
26+
}
27+
}
2228

2329
android {
2430
compileSdkVersion 25
@@ -47,30 +53,47 @@ dependencies {
4753
testCompile 'org.mockito:mockito-core:1.10.19'
4854
}
4955

50-
ext {
51-
52-
bintrayRepo = devProperties['repoName']
53-
bintrayName = devProperties['artifactId']
54-
55-
publishedGroupId = devProperties['groupId']
56-
libraryName = devProperties['repoName']
57-
artifact = devProperties['artifactId']
58-
59-
libraryDescription = 'Recyclerview Adapter library to create composable view holders'
60-
61-
siteUrl = 'https://github.com/DevAhamed/MultiViewAdapter'
62-
gitUrl = 'https://github.com/DevAhamed/MultiViewAdapter.git'
56+
publish {
57+
userOrg = 'devahamed'
58+
groupId = 'com.github.devahamed'
59+
artifactId = 'multi-view-adapter'
60+
repoName = 'MultiViewAdapter'
61+
publishVersion = '1.2.0'
62+
desc = 'Recyclerview Adapter library to create composable view holders'
63+
website = 'https://github.com/DevAhamed/MultiViewAdapter'
64+
}
6365

64-
libraryVersion = '1.1.0'
66+
if (project.hasProperty("android")) {
67+
// Android libraries
68+
task sourcesJar(type: Jar) {
69+
classifier = 'sources'
70+
from android.sourceSets.main.java.srcDirs
71+
}
6572

66-
developerId = devProperties['devId']
67-
developerName = devProperties['devName']
68-
developerEmail = devProperties['devEmail']
73+
task javadoc(type: Javadoc) {
74+
source = android.sourceSets.main.java.srcDirs
75+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
76+
failOnError true
77+
}
78+
afterEvaluate {
79+
javadoc.classpath +=
80+
files(android.libraryVariants.collect { variant -> variant.javaCompile.classpath.files
81+
})
82+
}
83+
} else {
84+
// Java libraries
85+
task sourcesJar(type: Jar, dependsOn: classes) {
86+
classifier = 'sources'
87+
from sourceSets.main.allSource
88+
}
89+
}
6990

70-
licenseName = 'The Apache Software License, Version 2.0'
71-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
72-
allLicenses = ["Apache-2.0"]
91+
task javadocJar(type: Jar, dependsOn: javadoc) {
92+
classifier = 'javadoc'
93+
from javadoc.destinationDir
7394
}
7495

75-
apply from: '../install.gradle'
76-
apply from: '../bintray.gradle'
96+
artifacts {
97+
archives javadocJar
98+
archives sourcesJar
99+
}

0 commit comments

Comments
 (0)