標簽(空格分隔): JitPack Android
JitPack官網的介紹是這樣的:
Easy to use package repository for Git Publish your JVM and Android libraries
1.在項目的根目錄的builde.gradle文件添加dependencies
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'2.在項目的根目錄的builde.gradle文件添加repositories
maven { url "https://jitpack.io" }buidle.gradle 文件代碼如下:
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' }}allPRojects { repositories { jcenter() maven { url "https://jitpack.io" } }}3.在需要上傳的Library Module 里面的buile.gradle中添加:
apply plugin: 'com.github.dcendents.android-maven'buidle.gradle 代碼如下:
apply plugin: 'com.android.library'apply plugin: 'com.github.dcendents.android-maven'android { compileSdkVersion 25 buildToolsVersion "25.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 25 versionCode 44 versionName "4.0.4" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }}dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:support-v4:25.0.0'}在添加好JitPack配置后,我們將代碼提交到github上,點擊項目的release,發布一個新的release
打開JitPack官網 https://jitpack.io/,我們可以用github賬號進行登錄。 輸入github地址,點擊Look up 即可獲取
新聞熱點
疑難解答