-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
89 lines (75 loc) · 2.5 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
}
plugins {
id 'java'
id 'groovy'
id 'com.gradle.plugin-publish' version '1.2.1'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation gradleApi()
implementation localGroovy()
implementation 'nu.studer:java-ordered-properties:1.0.4'
testImplementation gradleTestKit()
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
}
ext {
// Author
developerId = 'davideas'
developerName = 'Davide Steduto'
developerEmail = '[email protected]'
// Library Repository
groupId = 'eu.davidea'
artifactId = 'grabver'
libraryName = 'GrabVer'
libraryVersion = '2.0.3'
libraryTitle = 'Gradle Automatic Build Versioning Plugin'
libraryDescription = 'An easy Gradle plugin that follows semver.org rules to automatically generate the Patch version, Build number and Code version, while Major, Minor and Pre-Release suffix remain under our control.'
libraryTags = ['semver', 'version', 'versioning', 'build-versioning', 'automatic-versioning', 'intellij-idea', 'android-studio', 'auto-reset']
siteUrl = 'https://github.com/davideas/GrabVer'
gitUrl = 'https://github.com/davideas/GrabVer.git'
// License
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ['Apache-2.0']
}
group groupId
version libraryVersion
javadoc {
// Suppresses the warnings
options.addBooleanOption('Xdoclint:none', true)
}
// To publish to Maven local: gradle publishToMavenLocal
// To publish to Gradle Plugin Central: gradle publishPlugin [--validate-only]
gradlePlugin {
website = project.siteUrl
vcsUrl = project.gitUrl
plugins {
grabverPlugin {
id = project.groupId + '.' + project.artifactId
displayName = project.libraryTitle
description = project.libraryDescription
tags = project.libraryTags
implementationClass = project.groupId + '.gradle.GrabVer'
}
}
}
// To publish to Maven: gradle publish
if (gradle.getStartParameter().getTaskNames().contains("publish")) {
//apply from: 'maven-publish.gradle'
}
// To run unit tests add in command line: -P test
tasks.test {
it.jvmArgs = ["--add-opens=java.base/java.lang=ALL-UNNAMED"]
onlyIf {
providers.gradleProperty("test").isPresent()
}
}