Skip to content

Commit 4c2bd5b

Browse files
author
Keval
committed
Releasing version 1.0
1 parent bedd05b commit 4c2bd5b

File tree

4 files changed

+110
-2
lines changed

4 files changed

+110
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Open-Weather-API-Wrapper
2+
3+
[ ![Download](https://api.bintray.com/packages/kevalpatel2106/maven/Open-Weather-API-Wrapper/images/download.svg) ](https://bintray.com/kevalpatel2106/maven/Open-Weather-API-Wrapper/_latestVersion)
4+
25
An Android wrapper for the APIs of https://openweathermap.org

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:2.2.3'
9-
9+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
10+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
1011
// NOTE: Do not place your application dependencies here; they belong
1112
// in the individual module build.gradle files
1213
}

open-weather-wrapper/build.gradle

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
23

34
android {
45
compileSdkVersion 25
56
buildToolsVersion "25.0.2"
67

8+
lintOptions {
9+
abortOnError false
10+
}
11+
712
defaultConfig {
813
minSdkVersion 14
914
targetSdkVersion 25
@@ -34,3 +39,97 @@ dependencies {
3439

3540
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
3641
}
42+
43+
//#################################### Bintray ####################################//
44+
if (project.rootProject.file('local.properties').exists()) {
45+
apply plugin: 'com.jfrog.bintray'
46+
47+
version = "1.0" // This is the library version used when deploying the artifact
48+
49+
def siteUrl = 'https://github.com/kevalpatel2106/Open-Weather-API-Wrapper' // Homepage URL of the library
50+
def gitUrl = 'https://github.com/kevalpatel2106/Open-Weather-API-Wrapper.git' // Git repository URL
51+
52+
group = "com.kevalpatel2106"
53+
54+
install {
55+
repositories.mavenInstaller {
56+
// This generates POM.xml with proper parameters
57+
pom {
58+
project {
59+
packaging 'aar'
60+
61+
// Add your description here
62+
name 'Open-Weather-API-Wrapper'
63+
description = 'An Android wrapper for the APIs of https://openweathermap.org.'
64+
url siteUrl
65+
66+
// Set your license
67+
licenses {
68+
license {
69+
name 'The Apache Software License, Version 2.0'
70+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
71+
}
72+
}
73+
developers {
74+
developer {
75+
id 'kevalpatel2106'
76+
name 'Keval Patel'
77+
email 'kevalpatel2106@gmail.com'
78+
}
79+
}
80+
scm {
81+
connection gitUrl
82+
developerConnection gitUrl
83+
url siteUrl
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
task sourcesJar(type: Jar) {
91+
from android.sourceSets.main.java.srcDirs
92+
classifier = 'sources'
93+
}
94+
95+
task javadoc(type: Javadoc) {
96+
source = android.sourceSets.main.java.srcDirs
97+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
98+
}
99+
100+
task javadocJar(type: Jar, dependsOn: javadoc) {
101+
classifier = 'javadoc'
102+
from javadoc.destinationDir
103+
}
104+
artifacts {
105+
// archives javadocJar
106+
archives sourcesJar
107+
}
108+
109+
Properties properties = new Properties()
110+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
111+
112+
// https://github.com/bintray/gradle-bintray-plugin
113+
bintray {
114+
user = properties.getProperty("bintray.user")
115+
key = properties.getProperty("bintray.apikey")
116+
117+
configurations = ['archives']
118+
pkg {
119+
repo = "maven"
120+
// it is the name that appears in bintray when logged
121+
name = "Open-Weather-API-Wrapper"
122+
websiteUrl = siteUrl
123+
vcsUrl = gitUrl
124+
licenses = ["Apache-2.0"]
125+
publish = true
126+
version {
127+
gpg {
128+
sign = false //Determines whether to GPG sign the files. The default is false
129+
// passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing'
130+
}
131+
}
132+
}
133+
}
134+
}
135+

sample/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ apply plugin: 'com.android.application'
33
android {
44
compileSdkVersion 25
55
buildToolsVersion "25.0.2"
6+
7+
lintOptions {//5ae14346421dddcb597ebcf1e3579d83
8+
abortOnError false
9+
}
10+
611
defaultConfig {
712
applicationId "com.openweatherapi.sample"
813
minSdkVersion 14
@@ -28,4 +33,4 @@ dependencies {
2833
})
2934
compile 'com.android.support:appcompat-v7:25.1.0'
3035
testCompile 'junit:junit:4.12'
31-
}
36+
}

0 commit comments

Comments
 (0)