-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
105 lines (90 loc) · 2.55 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
// id 'checkstyle' doesn't work with jitpack for some reason
// id 'org.jetbrains.kotlin.jvm' version '1.3.60'
}
group 'org.hyperskill'
version '12.0.3'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
api 'junit:junit:4.13.2'
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
api 'org.assertj:assertj-swing-junit:3.17.1'
api 'org.apache.httpcomponents:httpclient:4.5.14'
api 'com.google.code.gson:gson:2.10.1'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// compileKotlin {
// kotlinOptions.jvmTarget = "1.8"
// }
// compileTestKotlin {
// kotlinOptions.jvmTarget = "1.8"
// }
wrapper {
gradleVersion = '8.5'
}
task resolveDependencies {
doLast {
project.rootProject.allprojects.each { subProject ->
subProject.buildscript.configurations.each { configuration ->
if (configuration.isCanBeResolved()) {
configuration.resolve()
}
}
subProject.configurations.each { configuration ->
if (configuration.isCanBeResolved()) {
configuration.resolve()
}
}
}
}
}
task createFatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Main-Class': 'org.hyperskill.hstest.stage.StageTest'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
publishing {
publications {
stable(MavenPublication) {
groupId = "com.github.hyperskill"
artifactId = "hs-test"
version = project.version
from components.java
}
snapshot(MavenPublication) {
groupId = "com.github.hyperskill"
artifactId = "hs-test"
version = "release-SNAPSHOT"
from components.java
}
}
repositories {
maven {
url "https://packages.jetbrains.team/maven/p/hyperskill-hs-test/maven"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}