summaryrefslogtreecommitdiff
path: root/sdl_android/bintray.gradle
blob: ebbf65599312e65c628e4c56713838ee3ac13f66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apply plugin: "com.jfrog.bintray"
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

def siteUrl = 'https://github.com/smartdevicelink/sdl_android'      // Homepage URL of the library
def gitUrl = 'https://github.com/smartdevicelink/sdl_android.git'   // Git repository URL
group = "com.smartdevicelink" // Maven Group ID for the artifact
def libDescription = 'SmartDeviceLink mobile library for Android'

install {
    repositories.mavenInstaller {
        pom {
            project {
                packaging 'aar'

                // Add your description here
                name 'com.smartdevicelink:sdl_android'
                description = libDescription
                url siteUrl

                // Set your license
                licenses {
                    license {
                        name 'BSD 3-Clause'
                        url 'https://opensource.org/licenses/BSD-3-Clause'
                    }
                }
                scm {
                    connection gitUrl
                    developerConnection gitUrl
                    url siteUrl
                }
            }
        }
    }
}

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

artifacts {
    archives sourcesJar
}

bintray {
    Properties props = new Properties()
    props.load(new FileInputStream("$projectDir/bintray.properties"))

    // Authorization
    user = props.getProperty("bintray.user")
    key = props.getProperty("bintray.key")

    configurations = ['archives']
    pkg {
        repo = props.getProperty("bintray.repo")
        name = props.getProperty("bintray.artifact")
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        userOrg = props.getProperty("bintray.userorg")
        licenses = ["BSD 3-Clause"]
        publish = props.getProperty("bintray.publish")  // Will upload to jCenter
        version {
            name = props.getProperty("bintray.version")  // Change to release version
            desc = libDescription
            released  = new Date()  // Will be the current date & time
            vcsTag = props.getProperty("bintray.vcs") // Should match git tag
        }
    }
}