This repository has been archived by the owner on Dec 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradler
84 lines (67 loc) · 1.79 KB
/
build.gradler
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
plugins {
id("maven")
id 'org.jetbrains.kotlin.jvm'
id 'maven-publish'
id("org.jetbrains.dokka")
id "com.github.johnrengelman.shadow" version "6.1.0"
}
def pluginVersion = "1.0.4"
apply plugin: "kotlin-kapt"
group = "de.jensklingenberg.cabret"
archivesBaseName = "cabret-compiler-plugin-native"
version = pluginVersion
install {
repositories.mavenInstaller {
pom.artifactId = archivesBaseName
}
}
repositories {
mavenLocal()
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
compileOnly "org.jetbrains.kotlin:kotlin-compiler"
compileOnly "com.google.auto.service:auto-service:1.0"
kapt "com.google.auto.service:auto-service:1.0"
implementation project(':cabret-compiler-runtime')
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version,
'Main-Class': 'de.jensklingenberg.cabret.NativeComponentRegistrar'
}
baseName = "cabret-compiler-plugin-native"
version = pluginVersion
from {
configurations.compileOnly.collect { it.isDirectory() ? it : zipTree(it) }
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
shadowJar {
manifest {
inheritFrom project.tasks.fatJar.manifest
}
baseName = "cabret-compiler-plugin-native"
version = pluginVersion
classifier = ""
}
kapt {
includeCompileClasspath = true
}
install{
dependsOn(shadowJar)
}
build{
dependsOn ':cabret-compiler-runtime:install'
dependsOn(shadowJar)
finalizedBy(publishToMavenLocal)
}
task JavadocsJar(type: Jar) {
classifier = 'javadoc'
from "$buildDir/javadoc"
}