-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
144 lines (125 loc) · 3.71 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
plugins {
id 'groovy'
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
id 'java-gradle-plugin'
id "com.gradle.plugin-publish" version "0.11.0"
id "maven-publish"
id "jacoco"
id "org.sonarqube" version "2.8"
id "com.github.roroche.plantuml" version "1.0.2"
id "org.fmiw.plantuml" version "0.1"
}
group 'com.github.roroche'
if (project.hasProperty('newVersion')) {
project.version = project.newVersion
} else {
project.version = '1.0.33-SNAPSHOT'
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation 'org.codehaus.groovy:groovy-all:3.0.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation gradleApi()
implementation localGroovy()
implementation 'ch.ifocusit:plantuml-builder:1.4'
implementation 'io.github.classgraph:classgraph:4.8.78'
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
testImplementation 'com.pragmaticobjects.oo.tests:oo-tests:0.0.1'
testImplementation 'com.pragmaticobjects.oo.tests:tests-junit5:0.0.1'
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.2")
testImplementation gradleTestKit()
testImplementation 'org.assertj:assertj-core:3.15.0'
}
test {
useJUnitPlatform()
}
compileGroovy {
dependsOn tasks.getByPath('compileKotlin')
classpath += files(compileKotlin.destinationDir)
}
compileTestGroovy {
dependsOn tasks.getByPath('compileTestKotlin')
classpath += files(compileTestKotlin.destinationDir)
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jacocoTestReport {
executionData(tasks.withType(Test))
reports {
xml.enabled = true
}
dependsOn(check)
}
sonarqube {
properties {
property "sonar.projectKey", "RoRoche_plantuml-gradle-plugin"
property "sonar.organization", "roroche"
property "sonar.host.url", "https://sonarcloud.io"
}
}
tasks.sonarqube.dependsOn(check, jacocoTestReport)
gradlePlugin {
plugins {
plantUmlPlugin {
id = 'com.github.roroche.plantuml'
implementationClass = 'com.github.roroche.plantuml.PlantUmlPlugin'
}
}
}
publishing {
publications {
pluginPublication(MavenPublication) {
from components.java
groupId project.group
artifactId "plantuml-gradle-plugin"
version project.version
}
}
}
pluginBundle {
website = 'https://github.com/RoRoche/plantuml-gradle-plugin'
vcsUrl = 'https://github.com/RoRoche/plantuml-gradle-plugin.git'
tags = [
'plantuml',
'plantuml-diagrams',
'plantuml-generator',
'living-documentation'
]
plugins {
plantUmlPlugin {
id = 'com.github.roroche.plantuml'
displayName = 'PlantUML plugin'
description = 'Gradle plugin to build PlantUML diagrams from code (for living and up-to-date documentation)'
}
}
}
classDiagram {
packageName = "com.github.roroche"
outputFile = project.file('diagrams/class_diagram.plantuml')
// ignoredClasses = [
// "com.github.roroche.plantuml.diagrams.Diagram\$Simple",
// "com.github.roroche.plantuml.diagrams.Diagram\$Wrap",
// "com.github.roroche.plantuml.classes.Classes\$Simple",
// "com.github.roroche.plantuml.classes.Classes\$Wrap",
// "com.github.roroche.plantuml.urls.Urls\$Wrap"
// ]
}
plantuml {
options {
outputDir = project.file('diagrams')
}
diagrams {
classes {
sourceFile = project.file('diagrams/class_diagram.plantuml')
}
}
}
generateDiagramClasses.dependsOn(buildClassDiagram)