-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
130 lines (114 loc) · 4.07 KB
/
build.gradle
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 'java'
id 'java-gradle-plugin'
id 'maven-publish'
id "io.freefair.lombok" version "8.0.1"
}
group 'run.halo.gradle'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
}
publishing {
repositories {
maven {
name = "SonatypePackages"
url = version.endsWith('-SNAPSHOT') ? 'https://s01.oss.sonatype.org/content/repositories/snapshots/' :
'https://s01.oss.sonatype.org/content/repositories/releases/'
credentials {
username = project.findProperty("ossr.user") ?: System.getenv("OSSR_USERNAME")
password = project.findProperty("ossr.password") ?: System.getenv("OSSR_PASSWORD")
}
}
}
publications {
ossr(MavenPublication) {
from(components.java)
groupId = 'run.halo.gradle'
artifactId = 'halo-gradle-plugin'
version = project.hasProperty('version') ? project.property('version') : 'unspecified'
pom {
name = 'HaloPluginDevtools'
description = 'Halo Gradle Plugin'
url = 'https://github.com/halo-sigs/halo-gradle-plugin'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'guqing'
name = 'guqing'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/halo-sigs/halo-gradle-plugin.git'
developerConnection = 'scm:git:ssh://[email protected]:/halo-sigs/halo-gradle-plugin.git'
url = 'https://github.com/halo-sigs/halo-gradle-plugin'
}
}
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
}
gradlePlugin {
plugins {
create('HaloPluginDevtools') {
id = 'run.halo.plugin.devtools'
displayName = 'Halo Plugin Devtools'
description = 'A plugin devtools for Halo'
implementationClass = 'run.halo.gradle.HaloDevtoolsPlugin'
}
}
}
ext {
jackjson = '2.14.0'
lang3 = '3.12.0'
semver4j = '0.9.0'
asm = '9.4'
dockerJava = '3.3.0'
jsonPatch = '1.13'
openApiGenerator = '7.7.0'
}
dependencies {
implementation("com.github.docker-java:docker-java-transport-httpclient5:$dockerJava") {
exclude group: 'org.slf4j'
}
implementation("com.github.docker-java:docker-java-core:$dockerJava") {
exclude group: 'org.slf4j'
exclude group: 'com.fasterxml.jackson.core'
}
implementation("org.openapitools:openapi-generator:$openApiGenerator")
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackjson"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackjson"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackjson"
implementation "org.apache.commons:commons-lang3:$lang3"
implementation "com.github.zafarkhaja:java-semver:$semver4j"
implementation "org.ow2.asm:asm:$asm"
implementation "org.ow2.asm:asm-commons:$asm"
implementation 'commons-io:commons-io:2.11.0'
implementation "com.github.java-json-tools:json-patch:$jsonPatch"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'org.skyscreamer:jsonassert:1.5.1'
}
test {
useJUnitPlatform()
}