aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
blob: 8d74f9b18f220bf6fd556fd29ea4c4797ee0b3ec (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
plugins {
    id "org.shipkit.shipkit-auto-version" version "1.1.1"
    id "org.shipkit.shipkit-changelog" version "1.1.10"
    id "org.shipkit.shipkit-github-release" version "1.1.10"
    id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
}

//TODO: change java packages to "org.mockito.kotlin"
group = 'org.mockito.kotlin'

tasks.named("generateChangelog") {
    previousRevision = project.ext.'shipkit-auto-version.previous-tag'
    githubToken = System.getenv("GITHUB_TOKEN")
    repository = "mockito/mockito-kotlin"
}

tasks.named("githubRelease") {
    def genTask = tasks.named("generateChangelog").get()
    dependsOn genTask
    repository = genTask.repository
    changelog = genTask.outputFile
    githubToken = System.getenv("GITHUB_TOKEN")
    newTagRevision = System.getenv("GITHUB_SHA")
}

nexusPublishing {
    repositories {
        if (System.getenv("NEXUS_TOKEN_PWD")) {
            sonatype {
                username = System.getenv("NEXUS_TOKEN_USER")
                password = System.getenv("NEXUS_TOKEN_PWD")
            }
        }
    }
}