2, add it in the header of the build.gradle of the library project
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray'
add at the end
apply from: "https://raw.githubusercontent.com/xiaopansky/android-library-publish-to-jcenter/master/bintrayUpload.gradle"
3, Add in the build.gradle of the project where the library is located
dependencies { classpath 'com.android.tools.build:gradle:2.1.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' }
Pay attention to the order of lines 3 and 4, the order is reversed, but it does not pass. . . .
4, Add the local.properties file in the library directory, and configure the variables in the file:
bintray.apikey=apikey value in the personal information of the account registered on bintray bintray.user=username of the bintray account #developer developer's information, you can customize it as you like developer.id=Sky developer.name=SkyCar [email protected] #module name project.name=WebViewUI #groudId is generally the package name, you can define it yourself project.groupId=com.bbsz.sky #must be the same as the module name project.artifactId=WebViewUI project.packaging = aar #Share the address of the library on github project.siteUrl=https://github.com/xxxx/WebViewUI project.gitUrl=https://github.com/xxxx/WebViewUI.git #javadoc javadoc.name=WebViewUI
5. Run gradlew install and gradlew bintrayUpload on the terminal of Android Studio to upload the maven repository
. 6. Log in to the bintray account, open the library just uploaded, and apply to jCenter. You can write the application content as you like.