forked from micronaut-projects/micronaut-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (73 loc) · 2.64 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
// First, apply the publishing plugin
plugins {
id "com.gradle.plugin-publish" version "0.12.0"
id "java-gradle-plugin"
id "maven-publish"
id "groovy"
id "com.adarshr.test-logger" version "2.1.1"
// Apply other plugins here, e.g. the kotlin plugin for a plugin written in Kotlin
// or the groovy plugin if the plugin uses Groovy
}
// If your plugin has any external java dependencies, Gradle will attempt to
// download them from JCenter for anyone using the plugins DSL
// so you should probably use JCenter for dependency resolution in your own
// project.
repositories {
jcenter()
}
// Unless overridden in the pluginBundle config DSL, the project version will
// be used as your plugin version when publishing
version = projectVersion
group = "io.micronaut.gradle"
// Use java-gradle-plugin to generate plugin descriptors and specify plugin ids
gradlePlugin {
plugins {
libraryPlugin {
id = 'io.micronaut.library'
implementationClass = 'io.micronaut.gradle.MicronautLibraryPlugin'
}
applicationPlugin {
id = 'io.micronaut.application'
implementationClass = 'io.micronaut.gradle.MicronautApplicationPlugin'
}
}
}
configurations {
optionalPluginDependencies
}
tasks.withType(PluginUnderTestMetadata) {
pluginClasspath.from(configurations.optionalPluginDependencies)
}
dependencies {
implementation "com.bmuschko:gradle-docker-plugin:6.7.0"
implementation "com.diffplug.gradle:goomph:3.28.2"
implementation "com.github.jengelman.gradle.plugins:shadow:6.1.0"
compileOnly "org.jetbrains.kotlin:kotlin-allopen:1.4.30"
compileOnly "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"
optionalPluginDependencies("org.jetbrains.kotlin:kotlin-allopen:1.4.10")
optionalPluginDependencies "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"
testImplementation("org.jetbrains.kotlin:kotlin-allopen:1.4.10")
testImplementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
testImplementation("org.codehaus.groovy:groovy:3.0.7")
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5")
}
// The configuration example below shows the minimum required properties
// configured to publish your plugin to the plugin portal
pluginBundle {
website = 'https://micronaut.io/'
vcsUrl = 'https://github.com/micronaut-projects/micronaut-gradle-plugins'
description = 'Gradle Plugins for Micronaut'
tags = ['micronaut']
plugins {
libraryPlugin {
displayName = 'Micronaut Library Plugin'
}
applicationPlugin {
displayName = 'Micronaut Application Plugin'
}
}
}
java {
sourceCompatibility = JavaVersion.toVersion('1.8')
targetCompatibility = JavaVersion.toVersion('1.8')
}