Skip to content

Commit 6de089c

Browse files
author
Wu Jing
committed
Fixed race604#1 - upload to jcenter
1 parent b6d61b1 commit 6de089c

File tree

4 files changed

+113
-25
lines changed

4 files changed

+113
-25
lines changed

README.md

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,47 @@ I implement this as a **FlyRefresh** layout. The content of the layout can be an
1212
* Support custom refresh animation
1313

1414
#How to use
15+
16+
Add Gradle dependency:
17+
18+
```gradle
19+
dependencies {
20+
compile 'com.race604.flyrefresh:1.0.0'
21+
}
22+
```
23+
1524
The basie usage in layou xml liks blow:
1625

1726
```xml
18-
<com.race604.flyrefresh.FlyRefreshLayout
19-
android:id="@+id/fly_layout"
27+
<com.race604.flyrefresh.FlyRefreshLayout
28+
android:id="@+id/fly_layout"
29+
android:layout_width="match_parent"
30+
android:layout_height="match_parent">
31+
32+
<android.support.v7.widget.RecyclerView
33+
android:id="@+id/list"
2034
android:layout_width="match_parent"
21-
android:layout_height="match_parent">
22-
23-
<android.support.v7.widget.RecyclerView
24-
android:id="@+id/list"
25-
android:layout_width="match_parent"
26-
android:layout_height="match_parent"
27-
android:paddingTop="24dp"
28-
android:background="#FFFFFF"/>
29-
</com.race604.flyrefresh.FlyRefreshLayout>
35+
android:layout_height="match_parent"
36+
android:paddingTop="24dp"
37+
android:background="#FFFFFF"/>
38+
</com.race604.flyrefresh.FlyRefreshLayout>
3039
```
3140

3241
Or you can use `PullHeaderLayout` for more cofigurations, you can set custome attributes below:
3342

3443
```xml
35-
<declare-styleable name="PullHeaderLayout">
36-
<!-- hader size -->
37-
<attr name="phl_header_height" format="dimension" />
38-
<attr name="phl_header_expand_height" format="dimension" />
39-
<attr name="phl_header_shrink_height" format="dimension" />
40-
<!-- header view id -->
41-
<attr name="phl_header" format="reference" />
42-
<!-- content view id -->
43-
<attr name="phl_content" format="reference" />
44-
<!-- Float action button icon -->
45-
<attr name="phl_action" format="reference" />
46-
</declare-styleable>
44+
<declare-styleable name="PullHeaderLayout">
45+
<!-- hader size -->
46+
<attr name="phl_header_height" format="dimension" />
47+
<attr name="phl_header_expand_height" format="dimension" />
48+
<attr name="phl_header_shrink_height" format="dimension" />
49+
<!-- header view id -->
50+
<attr name="phl_header" format="reference" />
51+
<!-- content view id -->
52+
<attr name="phl_content" format="reference" />
53+
<!-- Float action button icon -->
54+
<attr name="phl_action" format="reference" />
55+
</declare-styleable>
4756
```
4857
For more, please turn to the source code.
4958

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:1.2.3'
9+
classpath 'com.github.dcendents:android-maven-plugin:1.2'
10+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
911

1012
// NOTE: Do not place your application dependencies here; they belong
1113
// in the individual module build.gradle files

library/build.gradle

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'com.jfrog.bintray'
4+
5+
version = "1.0.0"
26

37
android {
48
compileSdkVersion 22
59
buildToolsVersion "22.0.1"
10+
resourcePrefix "flyrefresh__"
611

712
defaultConfig {
813
minSdkVersion 14
914
targetSdkVersion 22
1015
versionCode 1
11-
versionName "1.0"
16+
versionName version
1217
}
1318
buildTypes {
1419
release {
@@ -23,3 +28,72 @@ dependencies {
2328
compile 'com.android.support:appcompat-v7:22.1.1'
2429
compile 'com.getbase:floatingactionbutton:1.9.0'
2530
}
31+
32+
def siteUrl = 'https://github.com/race604/FlyRefresh'
33+
def gitUrl = 'https://github.com/race604/FlyRefresh.git'
34+
group = "com.race604.flyrefresh"
35+
36+
install {
37+
repositories.mavenInstaller {
38+
// This generates POM.xml with proper parameters
39+
pom {
40+
project {
41+
packaging 'aar'
42+
// Add your description here
43+
name 'A awsome pull to refresh widget'
44+
url siteUrl
45+
// Set your license
46+
licenses {
47+
license {
48+
name 'The MIT License (MIT)'
49+
url 'http://opensource.org/licenses/MIT'
50+
}
51+
}
52+
developers {
53+
developer {
54+
id 'race604'
55+
name 'Race604'
56+
57+
}
58+
}
59+
scm {
60+
connection gitUrl
61+
developerConnection gitUrl
62+
url siteUrl
63+
}
64+
}
65+
}
66+
}
67+
}
68+
task sourcesJar(type: Jar) {
69+
from android.sourceSets.main.java.srcDirs
70+
classifier = 'sources'
71+
}
72+
task javadoc(type: Javadoc) {
73+
source = android.sourceSets.main.java.srcDirs
74+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
75+
}
76+
task javadocJar(type: Jar, dependsOn: javadoc) {
77+
classifier = 'javadoc'
78+
from javadoc.destinationDir
79+
}
80+
artifacts {
81+
archives javadocJar
82+
archives sourcesJar
83+
}
84+
85+
Properties properties = new Properties()
86+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
87+
bintray {
88+
user = properties.getProperty("bintray.user")
89+
key = properties.getProperty("bintray.apikey")
90+
configurations = ['archives']
91+
pkg {
92+
repo = "maven"
93+
name = "FlyRefresh"
94+
websiteUrl = siteUrl
95+
vcsUrl = gitUrl
96+
licenses = ["MIT"]
97+
publish = true
98+
}
99+
}

library/library.iml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.id=":library" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="FlyRefresh" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.id=":library" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="com.race604.flyrefresh" external.system.module.version="1.0.0" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="android-gradle" name="Android-Gradle">
55
<configuration>
@@ -63,6 +63,7 @@
6363
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
6464
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
6565
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
66+
<excludeFolder url="file://$MODULE_DIR$/build/docs" />
6667
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
6768
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
6869
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
@@ -82,7 +83,9 @@
8283
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
8384
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8485
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
86+
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
8587
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
88+
<excludeFolder url="file://$MODULE_DIR$/build/poms" />
8689
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
8790
</content>
8891
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />

0 commit comments

Comments
 (0)