-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
79 lines (65 loc) · 2.15 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
plugins {
id 'groovy'
id 'java-gradle-plugin'
id 'maven-publish'
id "com.gradle.plugin-publish" version "0.9.10"
}
ext {
degraphVersion = '0.1.4'
}
group 'de.obqo.gradle'
version "${degraphVersion}.1"
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
task createClasspathManifest {
def outputDir = file("$buildDir/classpathManifest")
def pluginClasspath = sourceSets.main.runtimeClasspath
inputs.files pluginClasspath
outputs.dir outputDir
doLast {
outputDir.mkdirs()
file("$outputDir/plugin-classpath.txt").text = pluginClasspath.join("\n")
}
}
dependencies {
compileOnly "de.schauderhaft.degraph:degraph-check:${degraphVersion}"
// Work-around to prevent conflicting module version of groovy-all:
// Make the implicit (and incorrect) dependency to groovy-all explicit so the dependency conflict resolution
// will use this version of groovy (belonging to gradle 4.6) instead of an old one coming from an older gradle version.
// See also https://github.com/gradle/gradle/issues/3698, https://github.com/gradle/gradle/issues/1370
compile 'org.codehaus.groovy:groovy-all:2.4.12'
testCompile gradleTestKit()
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'commons-io:commons-io:2.5'
testRuntime files(createClasspathManifest)
}
def pluginId = 'de.obqo.gradle.degraph'
gradlePlugin {
plugins {
degraphPlugin {
id = pluginId
implementationClass = 'de.obqo.gradle.degraph.DegraphPlugin'
}
}
}
processResources {
doLast {
file("${buildDir}/resources/main/META-INF/gradle-plugins/${pluginId}.properties") << "default-tool-version=${degraphVersion}\n"
}
}
pluginBundle {
website = 'https://github.com/obecker/gradle-degraph'
vcsUrl = 'https://github.com/obecker/gradle-degraph'
plugins {
degraphPlugin {
id = 'de.obqo.gradle.degraph'
displayName = 'Gradle Degraph Plugin'
description = 'Gradle plugin that executes degraph dependency checks'
tags = ['degraph', 'code-quality']
}
}
}