This repository was archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
108 lines (94 loc) · 2.95 KB
/
build.gradle.kts
File metadata and controls
108 lines (94 loc) · 2.95 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
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.3.3/samples
* This project uses @Incubating APIs which are subject to change.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("maven-publish")
kotlin("jvm") version "1.4.32"
}
group = project.property("group").toString()
version = project.property("version").toString()
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
buildscript {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
}
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation(kotlin("test"))
implementation("com.github.glwithu06:semver.kt:1.0.1")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = listOf(
"-Xopt-in=kotlin.Experimental",
"-Xopt-in=kotlin.ExperimentalStdlibApi"
)
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
artifacts {
add("archives", sourcesJar)
}
val publicationName = "DependencyValidation"
publishing {
publications {
create<MavenPublication>(publicationName) {
from(components["java"])
artifact(sourcesJar.get())
groupId = project.property("group").toString()
version = project.property("version").toString()
artifactId = project.property("artifact").toString()
description = "Set of code to support the validation of dependencies on Gradle projects"
pom {
name.set("App Rail")
url.set("https://app-rail.io")
licenses {
license {
name.set("Apache 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.html")
distribution.set("repo")
}
}
developers {
developer {
id.set("futureworkshops")
name.set("Future Workshops")
email.set("info@futureworkshops.com")
}
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/FutureWorkshops/GradleDependencyValidation")
credentials {
username = project.findProperty("gpr.user")?.toString() ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key")?.toString() ?: System.getenv("TOKEN")
}
}
}
}