-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
79 lines (67 loc) · 2.05 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.4.10"
`maven-publish`
}
group = "com.mazenrashed"
version = "1.0.0"
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testImplementation(kotlin("test-junit"))
implementation("com.squareup.moshi:moshi-kotlin:1.11.0")
}
tasks.test {
useJUnit()
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8"
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "moshi-kotlin-extensions"
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("Moshi Kotlin Extensions")
description.set("Kotlin extensions for Moshi, Make every thing you want with Moshi in just one line.")
url.set("https://github.com/mazenrashed/MoshiKotlinExtensions")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("mazenrashed")
name.set("Mazen Rashed")
email.set("[email protected]")
}
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
val releasesRepoUrl = uri("$buildDir/repos/releases")
val snapshotsRepoUrl = uri("$buildDir/repos/snapshots")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
}
}
}