发布Android库不包含依赖项

时间:2016-10-28 09:36:24

标签: android maven artifactory

我想在我的库中包含依赖项,因此用户不需要再次在他们的应用程序中添加。

我找到了一些article,似乎没有希望。

GRADLE CONFIGURE(适用于发布)

def libraryGroupId = 'com.jz.fuselocation'
def libraryArtifactId = 'library'
def libraryVersion = '1.0.6'

publishing {
    publications {
        aar(MavenPublication) {
            groupId libraryGroupId
            version libraryVersion
            artifactId libraryArtifactId

            artifact("$buildDir/outputs/aar/${artifactId}-release.aar")
        }
    }
}
artifactory {
    contextUrl = 'http://artf.viinsoft.com/artifactory'
    publish {
        repository {
            repoKey = 'libs-release-local'

            username = artifactory_username
            password = artifactory_password
        }
        defaults {
            publications('aar')
            publishArtifacts = true

            properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
            publishPom = true
        }
    }
}

1 个答案:

答案 0 :(得分:0)

使用jitpack解决问题。 。 。 Thank to this article