-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
98 lines (83 loc) · 2.25 KB
/
build.gradle
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
buildscript {
repositories {
maven {
url 'https://maven.pkg.github.com/illjut/semrel'
credentials {
username System.getenv("REGISTRY_USER") ?: "none"
password System.getenv("GITHUB_TOKEN") ?: "none"
}
}
jcenter()
maven { url 'https://dl.bintray.com/illjut/maven' }
mavenLocal()
}
dependencies {
classpath group: 'de.illjut.gradle', name: 'semrel', version: project.findProperty('semrelVersion') ?: '1.4.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
}
}
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
id "com.github.ben-manes.versions" version "0.33.0"
}
apply plugin: 'com.jfrog.bintray'
apply plugin: 'de.illjut.gradle.semrel'
repositories {
jcenter()
}
test {
useJUnitPlatform()
}
dependencies {
implementation gradleApi()
implementation localGroovy()
implementation "org.yaml:snakeyaml:1.27"
implementation "org.ajoberstar.grgit:grgit-core:4.1.0"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.4.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.21.0'
}
group = 'de.illjut.gradle'
gradlePlugin {
plugins {
semanticReleasePlugin {
id = 'de.illjut.gradle.semrel'
implementationClass = 'de.illjut.gradle.semrel.SemrelPlugin'
}
}
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/illjut/semrel")
credentials {
username = System.getenv("PUBLISH_USER") ?: ""
password = System.getenv("PUBLISH_TOKEN") ?: "none"
}
}
}
publications {
pluginMaven(MavenPublication) {
pom {
name = "Gradle Semantic Release"
description = "semantic-release for gradle"
}
}
}
}
project.tasks.release.onlyIf { !project.version.endsWith("-SNAPSHOT") }
tasks.withType(PublishToMavenRepository) {
onlyIf { !project.version.endsWith("-SNAPSHOT") }
dependsOn project.tasks.release
}