Skip to content

Commit

Permalink
commit to jcenter
Browse files Browse the repository at this point in the history
  • Loading branch information
luckybilly committed Mar 21, 2019
1 parent 744c161 commit 1bf2502
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Gloading

Show global loading status view in a low coupling way for Android
Show global loading status view in a low coupling way for Android App


Latest Version: [![Download](https://api.bintray.com/packages/hellobilly/android/Gloading/images/download.svg)](https://bintray.com/hellobilly/android/Gloading/_latestVersion)

## Usage

JCenter is coming soon.
```groovy
compile 'com.billy.android:Gloading:1.0.0'
```

#### 1. Provide global loading status views

Expand Down
98 changes: 98 additions & 0 deletions bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
apply plugin: 'com.jfrog.bintray'

version = libraryVersion

if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
} else { // Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
userOrg = properties.getProperty("bintray.userOrg") // Bintray的用户名,2016年11月更新。
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
}
}
}

apply plugin: 'com.github.dcendents.android-maven'

group = publishedGroupId // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}
}
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ buildscript {

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

Expand Down
38 changes: 38 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,41 @@ android {

dependencies {
}

ext {
bintrayRepo = 'android'
bintrayName = 'Gloading'

publishedGroupId = 'com.billy.android'
libraryName = 'Gloading'
artifact = 'Gloading'

libraryDescription = 'Show global loading status view in a low coupling way for Android App'

siteUrl = 'https://github.com/luckybilly/Gloading'
gitUrl = '[email protected]:luckybilly/Gloading.git'

libraryVersion = '1.0.0'

developerId = 'billy'
developerName = 'billy'
developerEmail = '[email protected]'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

apply from: rootProject.file('bintray.gradle')

apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('../repo-local')) //deploy到本地仓库
pom.groupId = publishedGroupId
pom.artifactId = artifact
pom.version = libraryVersion + '-SNAPSHOT'
}
}
}

0 comments on commit 1bf2502

Please sign in to comment.