-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathbuild.gradle
73 lines (59 loc) · 2.07 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
apply plugin: 'java-gradle-plugin'
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'com.google.protobuf'
apply from: "$rootDir/publishing.gradle"
def pluginId = 'com.github.marcoferrer.kroto-plus'
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.gradle.org/gradle/libs-releases-local/" }
google()
// Needed for resolving 'kotlinx-metadata-jvm'
// A transitive dependency of gradle Kotlin DSL
maven { url "https://kotlin.bintray.com/kotlinx/" }
}
gradlePlugin {
plugins {
krotoPlusPlugin {
id = pluginId
implementationClass = 'com.github.marcoferrer.krotoplus.gradle.KrotoPlusGradlePlugin'
}
}
}
dependencies{
implementation "com.google.protobuf:protobuf-java:${Versions.protobuf}"
compileOnly gradleApi()
compileOnly "org.gradle:gradle-kotlin-dsl:1.0.4"
compileOnly "com.google.protobuf:protobuf-gradle-plugin:0.8.8"
compileOnly 'com.google.gradle:osdetector-gradle-plugin:1.6.2'
compileOnly project(":protoc-gen-kroto-plus")
protobuf project(":protoc-gen-kroto-plus")
}
description = "Kroto+ Gradle Plugin"
pluginBundle {
website = 'https://github.com/marcoferrer/kroto-plus'
vcsUrl = 'https://github.com/marcoferrer/kroto-plus.git'
plugins {
krotoPlusPlugin {
id = pluginId
displayName = 'Kroto+ Config Plugin'
description = 'Protoc plugin for bringing together Kotlin, Protobuf, Coroutines, and gRPC'
tags = [ 'coroutines', 'kotlin', 'grpc', 'protobuf','protocol-buffers', 'code-generation' ]
}
}
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${Versions.protobuf}"}
//noinspection GroovyAssignabilityCheck
plugins {
kroto {
path = localPluginPath.kroto
}
}
generateProtoTasks {
def krotoConfig = file("krotoPlusConfig.asciipb")
all().each{ task ->
task.dependsOn ':kroto-plus-gradle-plugin:gen-config-dsl:jar'
configProtoTaskWithKroto(task, krotoConfig)
}
}
}