forked from lessthanoptimal/gversion-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
99 lines (89 loc) · 2.39 KB
/
build.gradle
File metadata and controls
99 lines (89 loc) · 2.39 KB
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
99
plugins {
id 'groovy-gradle-plugin'
id 'maven-publish'
id 'com.diffplug.spotless' version '7.0.3'
}
group = 'com.oakvillerobotics.gversion'
version = '1.10.3.1'
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
compileJava {
// Output byte code compatible with Java 8
options.compilerArgs += ["--release", "8"]
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/OakvilleDynamics/gversion-plugin")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
wrapper {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = '7.6.4'
}
spotless {
groovy {
// Use the default importOrder configuration
importOrder()
// removes semicolons at the end of lines
removeSemicolons()
// the Groovy Eclipse formatter extends the Java Eclipse formatter,
// so it formats Java files by default (unless `excludeJava` is used).
greclipse() // has its own section below
// exclude Java files from formatting
excludeJava()
indentWithSpaces(2)
}
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**', '**/bin/**'
}
toggleOffOn()
googleJavaFormat()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
groovyGradle {
target fileTree('.') {
include '**/*.gradle'
exclude '**/build/**', '**/build-*/**'
}
greclipse()
indentWithSpaces(4)
trimTrailingWhitespace()
endWithNewline()
}
format 'misc', {
target fileTree('.') {
include '**/*.md', '**/.gitignore'
exclude '**/build/**', '**/build-*/**'
}
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.12.2'
}