模仿慕课网一步步发布一个开源库到 JCenter

H:\common\-common-25.2.2\upload.gradle

// Bintray
/*
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    println user
    println key

    configurations = ['archives']
    pkg {
        repo = bintrayRepo
        name = bintrayName
        desc = libraryDescription
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = allLicenses
        publish = true
        publicDownloadNumbers = true
        version {
            desc = libraryDescription
            gpg {
                sign = true //Determines whether to GPG sign the files. The default is false
                passphrase = properties.getProperty("bintray.gpg.password")
                //Optional. The passphrase for GPG signing'
            }
        }
    }
}
*/

H:\common\-common-25.2.2\common-25.2.2\upload.gradle

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    println user
    println key
    configurations = ['archives']
    pkg {
        repo = bintrayRepo
        name = bintrayName
        desc = libraryDescription
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = allLicenses
        publish = true
        publicDownloadNumbers = true
        version {
            desc = libraryDescription
            gpg {
                sign = true //Determines whether to GPG sign the files. The default is false
                passphrase = properties.getProperty("bintray.gpg.password")
                //Optional. The passphrase for GPG signing'
            }
        }
    }
}

H:\common\-common-25.2.2\local.properties

 

## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Dec 10 07:59:28 CST 2018
ndk.dir=H\:\\heimaandroidadt\\adt-bundle-windows-x86_64_20140101\\adt-bundle-windows-x86_64_20140101\\sdk\\ndk9d
sdk.dir=H\:\\heimaandroidadt\\adt-bundle-windows-x86_64_20140101\\adt-bundle-windows-x86_64_20140101\\sdk

 

 

posted on 2018-12-11 04:16  绿茵好莱坞  阅读(343)  评论(0编辑  收藏  举报

导航