-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
91 lines (72 loc) · 2.27 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
buildscript {
repositories {
mavenCentral()
}
}
// Access Git info from build script
plugins {
id "org.ajoberstar.grgit" version "4.1.1"
id "com.diffplug.spotless" version "6.18.0"
}
apply plugin: 'java-library'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'maven-publish'
project.sourceCompatibility = 20
project.targetCompatibility = 20
// In this section you declare where to find the dependencies of your project
repositories {
mavenCentral()
mavenLocal()
maven { url = 'https://jitpack.io' }
}
dependencies {
implementation 'rhino:js:1.6R5'
implementation 'antlr:antlr:2.7.6'
implementation 'com.github.RPTools:parser:1.8.3'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
}
// Custom properties
ext {
// Get tag and commit info from Git to use for version numbering
def repo = grgit.open(currentDir: file('.'))
def head = repo.head()
def tags = repo.tag.list().find {
it.commit == head
}
if (tags) {
tagVersion = tags.getName()
project.version = tagVersion
}
revision = head.abbreviatedId
revisionFull = head.id
// println 'Configuring for ' + project.name + " " + tagVersion + " by " + vendor
}
group = "net.rptools.dicelib"
spotless {
java {
licenseHeaderFile 'spotless.license.java'
// Now using the Google Java style guide
//eclipse().configFile('build-resources/eclipse.prefs.formatter.xml')
googleJavaFormat("1.16.0")
// If you get exceptions thrown by spotlessApply, this might
// help. Enable it here if the problem is with a Java file, and
// below if it is not. Don't leave it enabled, as nothing will
// actually be updated if you do.
// https://github.com/diffplug/spotless/blob/master/PADDEDCELL.md
//paddedCell()
}
format 'misc', {
target '**/*.gradle', '**/.gitignore'
// spotless has built-in rules for most basic formatting tasks
trimTrailingWhitespace()
// or spaces. Takes an integer argument if you don't like 4
indentWithSpaces(4)
//paddedCell()
}
}
jar {
manifest {
attributes 'Implementation-Title': 'dicelib',
'Implementation-Version': project.version
}
}