-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
112 lines (94 loc) · 3.33 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
plugins {
id 'java-gradle-plugin'
id 'groovy'
id "com.gradle.plugin-publish" version "0.12.0"
id "com.github.hierynomus.license" version "0.15.0"
id 'maven-publish' // used for publishing to local maven repository
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
repositories {
jcenter()
gradlePluginPortal()
}
sourceCompatibility = 1.8
def defaultEncoding = 'UTF-8'
[compileJava, compileTestJava]*.options*.encoding = defaultEncoding
[compileGroovy, compileTestGroovy]*.options*.encoding = defaultEncoding
[compileGroovy, compileTestGroovy]*.groovyOptions*.encoding = defaultEncoding
configurations {
plugin.description = "Plugin's dependencies"
compile.extendsFrom plugin
}
dependencies {
implementation gradleTestKit()
implementation localGroovy()
implementation "gradle.plugin.com.google.gradle:osdetector-gradle-plugin:1.6.1"
implementation 'org.moditect:moditect:1.0.0.RC1'
plugin 'org.apache.maven:maven-aether-provider:3.3.9'
implementation "org.eclipse.aether:aether-connector-basic:$aetherVersion"
implementation "org.eclipse.aether:aether-transport-file:$aetherVersion"
implementation "org.eclipse.aether:aether-transport-http:$aetherVersion"
testImplementation('org.spockframework:spock-core:1.1-groovy-2.4') {
exclude module: 'groovy-all'
}
testImplementation 'cglib:cglib-nodep:3.2.10'
testImplementation 'org.objenesis:objenesis:3.0.1'
testImplementation('com.athaydes:spock-reports:1.6.1') { transitive = false}
}
shadowJar {
configurations = [project.configurations.plugin]
archiveClassifier = null
dependencies {
include(dependency('org.apache.maven:maven-aether-provider'))
include(dependency('org.apache.maven:maven-artifact'))
include(dependency('org.apache.maven:maven-builder-support'))
include(dependency('org.apache.maven:maven-model'))
include(dependency('org.apache.maven:maven-model-builder'))
include(dependency('org.apache.maven:maven-repository-metadata'))
}
relocate 'org.apache.maven', 'org.moditect.gradleplugin.shadow.maven'
}
jar.enabled = false
jar.dependsOn shadowJar
configurations {
[apiElements, runtimeElements].each {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
it.outgoing.artifact(shadowJar)
}
}
gradlePlugin {
plugins {
moditect {
id = 'org.moditect.gradleplugin'
implementationClass = 'org.moditect.gradleplugin.ModitectPlugin'
}
}
}
pluginBundle {
website = 'https://github.com/moditect/moditect-gradle-plugin/'
vcsUrl = 'https://github.com/moditect/moditect-gradle-plugin'
description = 'A Gradle plugin for ModiTect'
tags = ['moditect', 'java9', 'modules', 'jigsaw']
plugins {
moditect {
id = 'org.moditect.gradleplugin'
displayName = 'ModiTect Gradle Plugin'
}
}
}
jar {
manifest {
attributes 'Implementation-Title': "${project.archivesBaseName}",
'Implementation-Version': archiveVersion
}
}
license {
header rootProject.file("license-header.txt")
skipExistingHeaders true
ignoreFailures false
excludes(['**/*.properties'])
}