-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
81 lines (70 loc) · 2.23 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
import org.jetbrains.changelog.date
import net.researchgate.release.GitAdapter.GitConfig
import net.researchgate.release.ReleaseExtension
plugins {
`java-gradle-plugin`
`maven-publish`
kotlin("jvm") version "1.6.21"
id("org.jetbrains.kotlinx.kover") version "0.5.1"
id("com.gradle.plugin-publish") version "0.21.0"
id("net.researchgate.release") version "2.8.1"
id("org.jetbrains.changelog") version "1.3.1"
}
repositories {
mavenLocal()
gradlePluginPortal()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testImplementation("org.assertj:assertj-core:3.22.0")
}
kotlin {
jvmToolchain {
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(8))
}
}
tasks {
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
}
"afterReleaseBuild" {
dependsOn(
"publish",
"publishPlugins",
"patchChangelog"
)
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
fun ReleaseExtension.git(configure: GitConfig.() -> Unit) = (getProperty("git") as GitConfig).configure()
release {
git {
requireBranch = "main|\\d+\\.\\d+"
}
}
gradlePlugin {
plugins {
create("python-gradle-miniforge-plugin") {
id = "io.github.piyushroshan.python-gradle-miniforge-plugin"
implementationClass = "io.github.piyushroshan.python.PythonPlugin"
displayName =
"Gradle plugin to run Python projects in miniforge virtual env. https://github.com/piyushroshan/python-gradle-miniforge-plugin"
}
}
}
pluginBundle {
website = "https://github.com/piyushroshan/python-gradle-miniforge-plugin"
vcsUrl = "https://github.com/piyushroshan/python-gradle-miniforge-plugin"
description = "Gradle plugin to run Python projects in miniforge virtual env using the conda-forge channel."
tags = listOf("python", "venv", "numpy", "miniforge", "conda", "scipy", "pandas")
}
// Configuring changelog Gradle plugin https://github.com/JetBrains/gradle-changelog-plugin
changelog {
header.set(provider { "[${version.get()}] - ${date()}" })
}