Skip to content

Commit

Permalink
update bintray upload with github solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ToDou committed Jun 19, 2019
1 parent ae056a7 commit cfc32f1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 31 deletions.
4 changes: 4 additions & 0 deletions app/build.gradle
Expand Up @@ -19,6 +19,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=http://services.gradle.org/distributions/gradle-5.2.1-all.zip
60 changes: 31 additions & 29 deletions nestrefresh/bintray.gradle
@@ -1,45 +1,46 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'

version = "0.0.1-beta1"

uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:///Users/loopeer/.m2/repository")
repository(url: "file:///Users/todou/.m2/repository")
}
}
}

version = "0.0.1-beta1"
group = "com.github.todou"
archivesBaseName = "nestrefresh"
description = "Android Refresh kit by nest"

def siteUrl = 'https://github.com/ToDou/nestrefresh'
def gitUrl = 'https://github.com/ToDou/nestrefresh.git'
group = "com.github.todou"
def license = 'Apache-2.0'

install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
name 'Android Refresh kit by nest'
url siteUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'ToDou' //填写开发者基本信息
name 'ToDou'
email 'yytodou123@gmail.com'
publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/$archivesBaseName-release.aar")
groupId
artifactId archivesBaseName
version this.version

pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')

// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> 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)
}
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
Expand All @@ -51,6 +52,7 @@ task sourcesJar(type: Jar) {
artifacts {
archives sourcesJar
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
Expand All @@ -59,10 +61,10 @@ bintray {
configurations = ['archives']
pkg {
repo = "maven"
name = "nestrefresh"
name = archivesBaseName
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
licenses = [license]
publish = true
}
}
4 changes: 4 additions & 0 deletions nestrefresh/build.gradle
Expand Up @@ -22,6 +22,10 @@ android {
}
}

lintOptions {
abortOnError false
}

}

dependencies {
Expand Down
Expand Up @@ -87,7 +87,7 @@ class RefreshBarScrollBehavior @JvmOverloads constructor(context: Context? = nul
offset = behavior.getTopAndBottomOffset()
} else if (behavior is LoadMoreBehavior) {
loadMoreBehavior = behavior
offset = behavior.currentRange + getHeaderOffsetByBehavior()
offset = behavior.currentRange() + getHeaderOffsetByBehavior()
}
return setTopAndBottomOffset(offset)
}
Expand Down

0 comments on commit cfc32f1

Please sign in to comment.