rjw-plasticsurgeries/Source/build.gradle.kts
2023-10-07 14:39:19 +02:00

141 lines
4 KiB
Text

/*
* This file was generated by the Gradle "init" task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.3/samples
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id("com.ullink.msbuild") version "3.15"
}
version = "5371.0.1.6"
val friendlyName = "rjw-plasticsurgeries"
tasks.register<com.ullink.Msbuild>("buildC#_1.3") {
// either a solution file
// solutionFile = "${rootProject.name}.sln"
// or a project file (.csproj or .vbproj)
projectFile = file("${rootProject.name}/${rootProject.name}_1.3.csproj")
targets = listOf("Clean", "Rebuild")
configuration = "Release"
// destinationDir = "build/msbuild/bin"
}
tasks.register<com.ullink.Msbuild>("buildC#_1.4") {
// either a solution file
// solutionFile = "${rootProject.name}.sln"
// or a project file (.csproj or .vbproj)
projectFile = file("${rootProject.name}/${rootProject.name}_1.4.csproj")
targets = listOf("Clean", "Rebuild")
configuration = "Release"
// destinationDir = "build/msbuild/bin"
}
tasks.register<Exec>("sign_1.3") {
dependsOn("buildC#_1.3")
workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net48")
executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe"
args = listOf(
"sign",
"/seal",
"/t",
"http://timestamp.digicert.com",
"/a",
"/n",
"Stardust3D",
"/fd",
"certHash",
"${rootProject.name}.dll"
)
}
tasks.register<Exec>("sign_1.4") {
dependsOn("buildC#_1.4")
workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net48")
executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe"
args = listOf(
"sign",
"/seal",
"/t",
"http://timestamp.digicert.com",
"/a",
"/n",
"Stardust3D",
"/fd",
"certHash",
"${rootProject.name}.dll"
)
}
tasks.register("copy") {
dependsOn("copy_1.3", "copy_1.4", "copy_about")
}
tasks.register<Copy>("copy_about") {
from(project.projectDir.resolve("${rootProject.name}/About"))
into(project.projectDir.parentFile.resolve("About"))
}
tasks.register<Copy>("copy_1.3") {
dependsOn("copyDll_1.3")
from(project.projectDir.resolve("${rootProject.name}/1.3"))
into(project.projectDir.parentFile.resolve("1.3"))
}
tasks.register<Copy>("copy_1.4") {
dependsOn("copyDll_1.4")
from(project.projectDir.resolve("${rootProject.name}/1.4"))
into(project.projectDir.parentFile.resolve("1.4"))
}
tasks.register<Copy>("copyDll_1.3") {
dependsOn("sign_1.3")
from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net48/${rootProject.name}.dll"))
into(project.projectDir.parentFile.resolve("1.3/Assemblies"))
}
tasks.register<Copy>("copyDll_1.4") {
dependsOn("sign_1.4")
from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net48/${rootProject.name}.dll"))
into(project.projectDir.parentFile.resolve("1.4/Assemblies"))
}
tasks.register<Zip>("buildZip") {
dependsOn("clean", ":copy")
into("$friendlyName/1.3") {
from(project.projectDir.parentFile.resolve("1.3"))
}
into("$friendlyName/1.4") {
from(project.projectDir.parentFile.resolve("1.4"))
}
into("$friendlyName/About") {
from(project.projectDir.parentFile.resolve("About"))
}
into("$friendlyName/Defs") {
from(project.projectDir.parentFile.resolve("Defs"))
}
into("$friendlyName/Source/${rootProject.name}") {
from(project.projectDir.parentFile.resolve("Source/${rootProject.name}"))
excludes.add("**/obj/**")
}
}
tasks.clean {
delete.add(project.projectDir.parentFile.resolve("1.3"))
delete.add(project.projectDir.parentFile.resolve("1.4"))
delete.add(project.projectDir.parentFile.resolve("About"))
}
tasks.build {
//dependsOn("buildC#")
}
tasks.assemble {
dependsOn("buildZip")
}