Gradle Maven plugin “install” task does not work with Android library project

后端 未结 5 1525
[愿得一人]
[愿得一人] 2020-12-07 17:54

I want to install android library project to local maven repository. Here is build.gradle:

buildscript {
    repositories {
        mavenCentral()
          


        
5条回答
  •  独厮守ぢ
    2020-12-07 18:41

    Edit: Please refer to the github page (https://github.com/dcendents/android-maven-gradle-plugin) for the latest instructions and find the correct version to use. The original instructions are not suitable anymore with the latest gradle release.

    Original Post:

    I've modified the maven plugin to be compatible with android library projects. See the project on github: https://github.com/dcendents/android-maven-gradle-plugin

    Configure your android library projects to use it:

    buildscript {
        repositories {
            mavenCentral()
        }
    
        dependencies {
            classpath 'com.github.dcendents:android-maven-plugin:1.0'
        }
    }
    
    apply plugin: 'android-library'
    apply plugin: 'android-maven'
    

    Then you should be able to install aar into your local maven repository using the install task.

    Hope this helps, if you find issues with the plugin please let me know on github and I'll fix it.

提交回复
热议问题