-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
119 lines (100 loc) · 2.68 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'gradle.plugin.com.github.maiflai:gradle-scalatest:0.19'
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:3.7.0'
classpath "com.gradle.publish:plugin-publish-plugin:0.9.9"
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.3'
}
group = projectGroup
version = projectVersion
apply plugin: 'java-gradle-plugin'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'com.github.hierynomus.license'
apply plugin: 'com.diffplug.gradle.spotless'
apply plugin: 'com.github.maiflai.scalatest'
apply from: 'libs.gradle'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
compile libs.scala
testCompile libs.scalaTest
testCompile libs.pegdown
}
sourceSets {
funcTest {
scala.srcDir file('src/funcTest/scala')
resources.srcDir file('src/funcTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
}
task funcTest(type: Test) {
description = 'Runs the functional tests.'
group = 'verification'
testClassesDirs = sourceSets.funcTest.output.classesDirs
classpath = sourceSets.funcTest.runtimeClasspath
maxParallelForks = 1
}
check.dependsOn funcTest
gradlePlugin {
testSourceSets sourceSets.funcTest
}
license {
header = file('LICENSE')
strictCheck = true
skipExistingHeaders = false
excludes(['**/generated/**/*.scala',
'**/*.xml',
'**/*.xsd'])
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'Oleksii Lisikh'
ext.email = '[email protected]'
}
spotless {
scala {
scalafmt('1.4.0').configFile('.scalafmt.conf')
}
format 'misc', {
target '**/*.gradle', '**/*.properties'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}
task licenseAndFormat {
dependsOn 'licenseFormat', 'spotlessApply'
}
pluginBundle {
mavenCoordinates {
groupId = projectGroup
}
website = projectGithub
vcsUrl = projectGithub
description = pluginDescription
tags = ['scalaxb', 'scala', 'xml', 'binding']
plugins {
scalaxbPlugin {
id = 'com.github.alisiikh.scalaxb'
displayName = pluginDescription
}
}
}