-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathbuild.gradle
More file actions
130 lines (111 loc) · 3.35 KB
/
build.gradle
File metadata and controls
130 lines (111 loc) · 3.35 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
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
121
122
123
124
125
126
127
128
129
130
plugins {
id 'com.gradle.plugin-publish' version '2.1.1'
id 'java-gradle-plugin'
id 'groovy'
id 'jacoco'
id 'signing'
id 'net.researchgate.release' version '3.1.0'
id 'ru.vyarus.quality' version '6.0.1'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'ru.vyarus.java-lib' version '3.0.0'
id 'ru.vyarus.github-info' version '2.0.0'
id 'com.github.ben-manes.versions' version '0.54.0'
id "pl.droidsonroids.jacoco.testkit" version "1.0.12"
id 'ru.vyarus.mkdocs' version '4.0.1'
}
java {
sourceCompatibility = 1.8
}
wrapper {
gradleVersion = '8.14.3'
distributionType = Wrapper.DistributionType.BIN
}
repositories { mavenLocal(); mavenCentral(); gradlePluginPortal() }
dependencies {
implementation 'org.testcontainers:testcontainers:2.0.5'
testImplementation('org.spockframework:spock-core:2.4-M6-groovy-3.0') {
exclude group: 'org.codehaus.groovy'
}
testImplementation 'net.bytebuddy:byte-buddy:1.18.8'
testImplementation 'org.objenesis:objenesis:3.5'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
group = 'ru.vyarus'
description = 'Use python modules in gradle build'
github {
user = 'xvik'
license = 'MIT'
}
mkdocs {
extras = [
'version': '4.1.0',
'image': 'python:3.12.7-alpine3.20'
]
publish {
docPath = mkdocs.extras['version']
rootRedirect = true
rootRedirectTo = 'latest'
versionAliases = ['latest']
hideOldBugfixVersions = true
}
}
maven.pom {
developers {
developer {
id = 'xvik'
name = 'Vyacheslav Rusakov'
email = 'vyarus@gmail.com'
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
username = findProperty('sonatypeUser')
password = findProperty('sonatypePassword')
}
}
}
// skip signing for jitpack (snapshots)
tasks.withType(Sign).configureEach { onlyIf { !System.getenv('JITPACK') } }
// Required signing properties for release: signing.keyId, signing.password and signing.secretKeyRingFile
// (https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials)
javaLib {
// don't publish gradle metadata artifact
withoutGradleMetadata()
}
gradlePlugin {
plugins {
usePythonPlugin {
id = 'ru.vyarus.use-python'
displayName = project.description
description = 'Manage pip dependencies and use python in gradle build'
tags.set(['python', 'virtualenv'])
implementationClass = 'ru.vyarus.gradle.plugin.python.PythonPlugin'
}
}
}
release.git.requireBranch.set('master')
afterReleaseBuild {
dependsOn = [
'publishMavenPublicationToSonatypeRepository',
'closeAndReleaseSonatypeStagingRepository',
publishPlugins]
doLast {
logger.warn "RELEASED $project.group:$project.name:$project.version"
}
}
test {
useJUnitPlatform()
testLogging {
events 'skipped', 'failed'
exceptionFormat = 'full'
}
maxHeapSize = '2g'
doLast {
sleep(1000)
}
}
dependencyUpdates.revision = 'release'