From 45f8b4c9735c9829b091ca57d987aad13e120aee Mon Sep 17 00:00:00 2001 From: Jamling Date: Thu, 27 Apr 2017 14:39:28 +0800 Subject: [PATCH] update packaging script and readme --- README.md | 62 +++++++++++++++++++---------------- library/android-maven.gradle | 51 ++++++++-------------------- library/android.gradle | 4 +-- library/bintray.gradle | 3 +- library/build.gradle | 29 +++++++--------- library/gradle.properties | 4 +-- screenshot/qr_quickaf.png | Bin 448 -> 452 bytes 7 files changed, 61 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 554701a..d040eda 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ ## QuickAF [![Build Status](https://travis-ci.org/Jamling/QuickAF.svg?branch=master)](https://travis-ci.org/Jamling/QuickAF) +[![GitHub release](https://img.shields.io/github/release/jamling/QuickAF.svg?maxAge=3600)](https://github.com/Jamling/QuickAF) +[![Bintray](https://img.shields.io/bintray/v/jamling/maven/cn.ieclipse.af.svg?maxAge=86400)](https://bintray.com/jamling/maven/cn.ieclipse.af) + An Android framework library and demo to help you building your app quickly. @@ -8,7 +11,7 @@ An Android framework library and demo to help you building your app quickly. ## Sample apk -![sample apk](https://raw.githubusercontent.com/Jamling/QuickAF/master/screenshot/qr_quickaf.png) +[![sample apk](https://raw.githubusercontent.com/Jamling/QuickAF/master/screenshot/qr_quickaf.png)](https://github.com/Jamling/QuickAF/releases/download/v2.0.2/QuickAF2.0.2(2)-release.apk) ## Install @@ -16,7 +19,7 @@ An Android framework library and demo to help you building your app quickly. ```gradle dependencies { - compile 'cn.ieclipse.af:af-library:1.0.1' + compile 'cn.ieclipse.af:af-library:2.0.2' } android { // for target api >= 23 (Android 6.0) @@ -28,48 +31,50 @@ android { ## Features ![architecture](https://raw.githubusercontent.com/Jamling/QuickAF/master/screenshot/struct.png) -library: +### library - Component - - tab, tab+viewpager - - cview, lots of custom views, e.g. Preference, FlowLayout, TableLayout, AutoPlayView - - refresh, use RecycleView with pull to refresh, swipe menu, fix header features + - tab, tab+viewpager + - cview, lots of custom views, e.g. Preference, FlowLayout, TableLayout, AutoPlayView + - refresh, use RefreshLayout, support any RecyclerView, ListView and ScrollView - Network - - Volley+Gson, base on volley for data tranfer, gson for json parsing - - Common Task, common REST API request task - - Upload Task, compressed image upload task + - Volley+Gson, base on volley for data tranfer, gson for json parsing + - Common Task, common REST API request task + - Upload Task, compressed image upload task - Utils, lots of utility tool class e.g. - - DialogsUtils - - AppUtils - - FileUtils - - SharedPrefsUtils + - DialogsUtils + - AppUtils + - FileUtils + - SharedPrefsUtils -3rd library: (Use the existing wheels) +### 3rd library: (Use the existing wheels) - DB, recommend to use orm library - - Aorm see https://github.com/Jamling/Android-ORM -- Image, - - Universal-Image-Loader see https://github.com/nostra13/Android-Universal-Image-Loader - - Fresco see https://github.com/facebook/fresco + - Aorm see https://github.com/Jamling/Android-ORM +- Image + - Universal-Image-Loader see https://github.com/nostra13/Android-Universal-Image-Loader + - Fresco see https://github.com/facebook/fresco +- Pay + - af-pay see https://github.com/Jamling/af-pay -In sample: +### In sample: - Profile, sample user profile - - login - - register - - forget + - login + - register + - forget password - Common, common activity - - BaseActivity - - BaseFragment - - H5Activity - - SelectPhotoActivity + - BaseActivity + - BaseFragment + - H5Activity + - BaseListFragment ## Change log -###v2.0.0 +### v2.0.0 - New refresh component. - Import recyclerview adapter delegate. - Lost of bug fix -- ***Don't compatible to v1.x*** +- **Don't compatible to v1.x** ## Blog See http://www.ieclipse.cn/tags/QuickAF/ @@ -82,7 +87,6 @@ BadgeView https://github.com/stefanjauker/BadgeView PagerSlidingTabStrip https://github.com/astuetz/PagerSlidingTabStrip ScrollLayout http://blog.csdn.net/Yao_GUET - ## Contributors - [wangjiandett](https://github.com/wangjiandett) diff --git a/library/android-maven.gradle b/library/android-maven.gradle index ef0712b..485443e 100644 --- a/library/android-maven.gradle +++ b/library/android-maven.gradle @@ -1,29 +1,16 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.0.0' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' - } -} -Properties properties = new Properties() - -repositories { - jcenter() - maven { - url properties.getProperty("sdk.dir")+"/extras/android/m2repository" - } -} -apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' +//repositories { +// jcenter() +// maven { +// url "${android.sdkDirectory}/extras/android/m2repository" +// } +//} project.ext { + name = project.property('ART_ARTIFACT') group = project.property('ART_GROUP') version = project.property('ART_VER') - archivesBaseName = ART_ARTIFACT + artifactId = project.property('ART_ARTIFACT') + archivesBaseName = project.property('ART_ARTIFACT') } tasks.withType(Jar) { @@ -40,19 +27,6 @@ task sourcesJar(type: Jar) { classifier = 'sources' } -//task javadoc(type: Javadoc) { -// source = android.sourceSets.main.java.srcDirs -// classpath += project.files(configurations.compile.files, android.getBootClasspath().join(File.pathSeparator)) -// title PRJ_NAME + " " + ART_VER + " API" -// options.encoding 'utf-8' -// options.charSet 'utf-8' -// options.tags 'date:t:"Date:"' -//} - -//task javadocJar(type: Jar, dependsOn: generateDebugJavadoc) { -// classifier = 'javadoc' -// from javadoc.destinationDir -//} android.libraryVariants.all { variant -> // println variant.javaCompile.classpath.files if(variant.name == 'release') { @@ -72,9 +46,9 @@ android.libraryVariants.all { variant -> tags 'sample:t:Sample:' tags 'attr:a:Attribute:' } - //exclude '**/BuildConfig.java' - //exclude '**/R.java' - exclude 'cn/ieclipse/af/view/wheelview/' + exclude 'android/**/*' + exclude 'com/**/*' + exclude '**/*' } task("javadocJar", type: Jar, dependsOn: "generate${variant.name.capitalize()}Javadoc") { classifier = 'javadoc' @@ -95,6 +69,7 @@ task findConventions << { } install { + println(artifactId) repositories.mavenInstaller { // This generates POM.xml with proper parameters pom { diff --git a/library/android.gradle b/library/android.gradle index c79ac62..06f7bcf 100644 --- a/library/android.gradle +++ b/library/android.gradle @@ -37,11 +37,9 @@ android { } dependencies { - // compile fileTree(include: ['*.jar'], dir: 'libs') + compile fileTree(include: ['*.jar'], dir: 'libs') compile "com.android.support:recyclerview-v7:${supportLibVersion}" compile "com.android.support:support-core-ui:${supportLibVersion}" - //compile "com.android.support:support-v4:${supportLibVersion}" compile 'com.google.code.gson:gson:2.3' - // compile 'com.tubb.smrv:swipemenu-recyclerview:3.0.5' compile 'com.android.volley:volley:1.0.0' } \ No newline at end of file diff --git a/library/bintray.gradle b/library/bintray.gradle index f851f2f..1feb023 100644 --- a/library/bintray.gradle +++ b/library/bintray.gradle @@ -1,5 +1,3 @@ -apply plugin: 'com.jfrog.bintray' - bintray { user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') @@ -16,6 +14,7 @@ bintray { name = project.property('ART_VER') desc = project.property('PKG_VER_DESC') vcsTag = project.property('SCM_TAG') + released = new Date() //attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin'] } /* diff --git a/library/build.gradle b/library/build.gradle index 13d45ca..d7f574f 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,16 +1,12 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - // classpath 'com.android.tools.build:gradle:2.0.0' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' - } +plugins { + id "com.github.dcendents.android-maven" version "1.5" + id "com.jfrog.bintray" version "1.7.3" } apply plugin: 'com.android.library' + + apply from : './android.gradle' apply from : './android-maven.gradle' @@ -18,6 +14,7 @@ apply from : './android-maven.gradle' apply from : './bintray.gradle' task hello << { + println(rootProject.name) println(android.libraryVariants) def release; android.libraryVariants.all { variant -> @@ -27,12 +24,8 @@ task hello << { } } println("found:" + release.javaCompile.classpath.files) - - println(Rdir); -} -// apply from : 'android-maven.gradle' -/* -task build(type: GradleBuild) { - buildFile = 'android-maven.gradle' - tasks = ['bintray'] -}*/ \ No newline at end of file + def android_sdk = "${android.sdkDirectory}"; + def android_platform = "${android.compileSdkVersion}" + println(android_sdk); + println(android_platform); +} \ No newline at end of file diff --git a/library/gradle.properties b/library/gradle.properties index b6e0ec5..fdd0541 100644 --- a/library/gradle.properties +++ b/library/gradle.properties @@ -29,7 +29,7 @@ LIC_DESC= SCM_URL=https://github.com/Jamling/QuickAF SCM_REPO=https://github.com/Jamling/QuickAF.git SCM_DEV=git@github.com:Jamling/QuickAF.git -SCM_TAG= +SCM_TAG=v2.0.2 # MAVEN DEV DEV_NAME=QuickAF Project @@ -39,4 +39,4 @@ DEV_EMAIL=li.jamling@gmail.com # bintray pkg PKG_VER_DESC= bintrayUser=jamling -bintrayApiKey=e62a15c605ea4ea8af8205d01f5804bf1584b06b \ No newline at end of file +bintrayApiKey=f32bbe2d2e86f4644c948dc82aa69cc4fa30c168 diff --git a/screenshot/qr_quickaf.png b/screenshot/qr_quickaf.png index 010d08154213913747c438b2c7f4deae769c0fec..464b504a4c7a2e5d228469dedba6add058cfbc13 100644 GIT binary patch delta 408 zcmV;J0cZZe1H=Q6Hh+0ZL_t(oh3%F>a>FnT1Nj5~|Cjs$i-qjO?HQe1qJv|vG{caP zKvjLmhsW+t*VcLXGs^Xx>21xjU`&#HXB4cOc)U-ZE3AH$+SI@BsU~3epSTgult>{+ z&#!tWI6^R$=GH;gRd-kiI(uOK-mNzjKv=Lod_J5^Iic6E1@WWpSbG=^$ zlO$S0{3svFMQ-iW{n~FKu7Z`V$vNpG%@?V0Jyvi)!d$0L+sTx?^cCfHR67P>NiNF! zoa06opYYA{J(gz!ytZ+cOBIUNX94nuIonBcpg-@oucr9oNkq2$J$yUE3*X?>Eh(W+ zmJf!#xNFzTRDYw~TNY;>`^N1{A#TTZR$N-Ht4om2*;w2tj2`!a2zSfJkOAY^gQ}A9*L%9L>za=;D+NPN_-|MPBom6S(r4j)Q zL)CA6c>x$+JyqQ^+D19=$tSM~rub%Nt za3%U}J@k;^T5Wr@TsKQ`Fl1CLh0BkBO_Udt-cEgYNx-Nmr++O<7UZ(2e`UG9+DjV4 zrK=QI$+_^PtakB*IYG%Y`6OXgl)su@>%yJ&824^l)5x#OZi*|{mh31)IB`pHhRqg7 zaidq~eL~!+pgYdHT&yfF>s0}>ZY6{$SIppzY{G3M$^A^Vfo*^2it^ThtbS*kC+jgj zO8j~!kM6#g;(y%sjxFWBapIZbZlp7NFyOYE;&N>E@D!W(z-9QjZSU#Xx1K}XN~KF4 z0O~&WQ~c=Gg+1qWQe2kQx79x!!pU;az0z&%*mWf)#&<4N$kdcD$a7VMo9fnfo;!Hm yukk(0U3HcfTzO%>CFiZ4&vPFBKmV;Su0L=wBInqn)eV^d0000