-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
172 lines (155 loc) · 4.67 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
plugins {
id 'java'
id 'application'
id 'maven-publish'
id 'java-library'
id 'signing'
id 'org.jreleaser' version '1.14.0'
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
group 'io.github.yojo-generator'
//archivesBaseName = "generator"
version '1.0.4'
publishing {
repositories {
// maven {
// name = "GitHubPackages"
// url = uri("https://maven.pkg.github.com/yojo-generator/generator")
// credentials {
// username = project.findProperty("user") ?: System.getenv("USERNAME")
// password = project.findProperty("token") ?: System.getenv("TOKEN")
// }
// }
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
publications {
// gpr(MavenPublication) {
// from(components.java)
// }
mavenJava(MavenPublication) {
groupId = 'io.github.yojo-generator'
artifactId = 'generator'
from components.java
pom {
name = 'YOJO Generator'
description = "This spring-based project is a core-library for generate POJO's from asyncApi yaml contract."
url = 'https://github.com/yojo-generator/generator'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Vladimir Morozkin'
email = '[email protected]'
organization = 'YOJO-generator'
organizationUrl = 'https://github.com/yojo-generator'
}
}
scm {
connection = 'scm:git:git://github.com/yojo-generator/generator.git'
developerConnection = 'scm:git:ssh://github.com:yojo-generator/generator.git'
url = 'https://github.com/yojo-generator/generator/tree/master'
}
}
}
}
}
jreleaser {
project {
inceptionYear = "2024"
author("@vmorozkin")
tags = ['yaml', 'yaml-parser', 'asyncapi', 'pojo-builder', 'asyncapi-tools', 'asyncapi-generator', 'yaml-pojo', 'yojo', 'yaml-to-dto', 'yaml-to-pojo', 'yaml-to-java', 'yaml-to-java-dto', 'yaml-dto']
}
signing {
active = 'ALWAYS'
armored = true
verify = true
}
// environment {
// variables 'config.toml'
// }
release {
github {
skipRelease = true
skipTag = true
}
}
deploy {
maven {
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
sign = true
setAuthorization("Basic")
checksums = true
sourceJar = true
javadocJar = true
verifyPom = true
retryDelay = 60
applyMavenCentralRules = false
stagingRepository('build/staging-deploy')
}
}
}
}
}
repositories {
mavenCentral()
}
ext {
junitVersion = '5.8.2'
}
//Uncomment this if you need to test by YojoCLI
//sourceSets {
//// main {
//// java {
//// srcDir "${buildDir}/generated-sources"
//// }
//// }
// test {
// java {
// srcDir "src/test/resources/"
// }
// }
//}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'ru.yojo.codegen'
mainClass = 'ru.yojo.codegen.YojoCLI'
}
mainClassName = "ru.yojo.codegen.YojoCLI"
jar {
manifest {
attributes "Main-Class": "$mainClassName"
}
zip64 = true
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
duplicatesStrategy(DuplicatesStrategy.INCLUDE)
}
}
dependencies {
implementation 'org.springframework:spring-context:6.1.7'
implementation 'org.yaml:snakeyaml:2.0'
// implementation 'javax.validation:validation-api:2.0.1.Final'
compileOnly 'org.projectlombok:lombok:1.18.26'
testCompileOnly 'org.projectlombok:lombok:1.18.26'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.5'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
}
test {
useJUnitPlatform()
}