This repository has been archived by the owner on Dec 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
120 lines (103 loc) · 4.1 KB
/
build.gradle.kts
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
113
114
115
116
117
118
119
120
plugins {
id("org.openrewrite.build.recipe-library") version "latest.release"
}
group = "org.openrewrite"
description = "Rewrite CSharp"
val latest = if (project.hasProperty("releasing")) {
"latest.release"
} else {
"latest.integration"
}
dependencies {
annotationProcessor("org.projectlombok:lombok:latest.release")
compileOnly("org.openrewrite:rewrite-core")
compileOnly("org.openrewrite:rewrite-test")
compileOnly("org.projectlombok:lombok:latest.release")
compileOnly("com.google.code.findbugs:jsr305:latest.release")
implementation(platform("org.openrewrite:rewrite-bom:${latest}"))
implementation("org.openrewrite:rewrite-java")
implementation("org.openrewrite:rewrite-json")
implementation("org.openrewrite:rewrite-properties")
implementation("org.openrewrite:rewrite-xml")
implementation("org.openrewrite:rewrite-remote:latest.integration")
implementation("com.dylibso.chicory:runtime:latest.integration")
implementation("com.dylibso.chicory:wasi:latest.integration")
implementation("org.extism.sdk:extism:latest.integration")
// implementation("org.extism:chicory-sdk:latest.integration")
implementation("io.github.kawamuray.wasmtime:wasmtime-java:latest.integration")
implementation("com.fasterxml.jackson.core:jackson-core")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor")
testImplementation("org.assertj:assertj-core:latest.release")
testImplementation("org.junit.jupiter:junit-jupiter-api:latest.release")
testImplementation("org.junit.jupiter:junit-jupiter-params:latest.release")
testImplementation("org.junit-pioneer:junit-pioneer:2.0.0")
testImplementation("org.openrewrite:rewrite-test")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release")
testRuntimeOnly("org.openrewrite:rewrite-java-17")
}
tasks.compileJava {
// The Java `UnixDomainSocketAddress` API requires at least Java 16
options.release = 17
}
//tasks.named<Copy>("processResources").configure {
// from(file("wasm/bin/Debug/net8.0/wasi-wasm/AppBundle/wasm.wasm")) {
// into(".")
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// }
//}
// We don't care about publishing javadocs anywhere, so don't waste time building them
tasks.withType<Javadoc>().configureEach {
enabled = false
}
tasks.named<Jar>("sourcesJar") {
enabled = false
}
tasks.named<Jar>("javadocJar") {
enabled = false
}
val emptySourceJar = tasks.create<Jar>("emptySourceJar") {
file("README.md")
archiveClassifier.set("sources")
}
val emptyJavadocJar = tasks.create<Jar>("emptyJavadocJar") {
file("README.md")
archiveClassifier.set("javadoc")
}
license {
exclude("META-INF/rewrite/resources/**/*")
}
publishing {
publications.named<MavenPublication>("nebula") {
artifactId = project.name
description = project.description
artifacts.clear() // remove the regular JAR
// Empty JARs are OK: https://central.sonatype.org/publish/requirements/#supply-javadoc-and-sources
artifact(tasks.named("jar"))
artifact(emptySourceJar)
artifact(emptyJavadocJar)
pom {
name.set(project.name)
description.set(project.description)
url.set("https://moderne.io")
licenses {
license {
name.set("Creative Commons Attribution-NonCommercial 4.0")
url.set("https://creativecommons.org/licenses/by-nc-nd/4.0/deed.en")
}
}
developers {
developer {
name.set("Team Moderne")
email.set("support@moderne.io")
organization.set("Moderne, Inc.")
organizationUrl.set("https://moderne.io")
}
}
scm {
connection.set("scm:git:git://github.com/moderneinc/rewrite-codemods.git")
developerConnection.set("scm:git:ssh://github.com:moderneinc/rewrite-codemods.git")
url.set("https://github.com/moderneinc/rewrite-codemods/tree/main")
}
}
}
}