-
-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
65 lines (56 loc) · 1.9 KB
/
build.gradle.kts
File metadata and controls
65 lines (56 loc) · 1.9 KB
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
plugins{
`java-gradle-plugin`
alias(libs.plugins.gradlePublish)
kotlin("jvm") version libs.versions.kotlin
}
repositories {
mavenCentral()
maven("https://jogamp.org/deployment/maven")
}
dependencies{
implementation(project(":java:preprocessor"))
implementation(libs.composeGradlePlugin)
implementation(libs.kotlinGradlePlugin)
implementation(libs.kotlinComposePlugin)
testImplementation(project(":core"))
testImplementation(libs.junit)
}
gradlePlugin{
website = "https://processing.org/"
vcsUrl = "https://github.com/processing/processing4"
plugins{
create("processing.java"){
id = "$group.java"
displayName = "Processing Plugin"
description = "Gradle plugin for building Processing sketches"
tags = listOf("processing", "sketch", "dsl")
implementationClass = "org.processing.java.gradle.ProcessingPlugin"
}
}
}
publishing{
repositories{
mavenLocal()
maven {
name = "App"
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
}
}
}
// Grab the group before running tests, since the group is used in the test configuration and may be modified by the publishing configuration
val testGroup = group.toString()
tasks.withType<Test>().configureEach {
systemProperty("project.group", testGroup)
dependsOn(project(":core").tasks.named("publishToMavenLocal"))
}
tasks.register("writeVersion") {
// make the version available to the plugin at runtime by writing it to a properties file in the resources directory
doLast {
val file = layout.buildDirectory.file("resources/main/version.properties").get().asFile
file.parentFile.mkdirs()
file.writeText("version=${project.version}")
}
}
tasks.named("processResources") {
dependsOn("writeVersion")
}