diff --git a/README.md b/README.md index 3bb2033..dfe98b4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # PayAndroid [![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0) +[![](https://jitpack.io/v/tsy12321/PayAndroid.svg)](https://jitpack.io/#tsy12321/PayAndroid) > 对微信支付和支付宝支付的App端SDK进行二次封装,对外提供一个较为简单的接口和支付结果回调 @@ -17,7 +18,24 @@ ## Android SDK接入指南 -### 1. 下载最新SDK,以module的方式引入。 +### 如何添加 +#### 1.在Project的build.gradle 中添加仓库地址 + +``` gradle +allprojects { + repositories { + jcenter() + // JitPack仓库地址 + maven { url "https://jitpack.io" } + } +} +``` + +#### 2.在app目录下的build.gradle中添加依赖 + +```gradle + compile 'com.github.tsy12321:PayAndroid:1.0.0' +``` ### 2. Android Manifest配置 diff --git a/build.gradle b/build.gradle index c20bca1..6026df7 100644 --- a/build.gradle +++ b/build.gradle @@ -6,15 +6,14 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } allprojects { repositories { jcenter() + maven { url 'https://jitpack.io' } } } diff --git a/pay_android_sdk/build.gradle b/pay_android_sdk/build.gradle index db4edfc..111c40f 100644 --- a/pay_android_sdk/build.gradle +++ b/pay_android_sdk/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' + +group='com.github.tsy12321' android { compileSdkVersion 24