Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 6bae8d9

Browse files
committed
Update shared build scripts
1 parent 7d9519d commit 6bae8d9

File tree

8 files changed

+21
-61
lines changed

8 files changed

+21
-61
lines changed

buildSrc/src/main/kotlin/common-build-script.gradle.kts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,13 @@ object Versions {
22
const val simpleJavaMail = "6.5.2"
33
}
44

5-
val repoName = "SimpleKotlinMail"
6-
75
group = "net.axay"
86
version = "1.3.3"
97

10-
description = "A simple, modern and coroutine based Kotlin Email API, supporting both clientside and serverside projects"
11-
128
repositories {
139
mavenCentral()
1410
}
1511

1612
plugins {
1713
kotlin("jvm")
18-
`java-library`
19-
}
20-
21-
java {
22-
withSourcesJar()
23-
withJavadocJar()
2414
}
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
import org.gradle.api.JavaVersion
2-
import org.gradle.kotlin.dsl.withType
31
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
42

5-
val jvmVersion = JavaVersion.VERSION_11
6-
val jvmVersionString = jvmVersion.versionString
7-
83
plugins {
94
`java-library`
105
}
116

12-
java {
13-
java.sourceCompatibility = jvmVersion
14-
java.targetCompatibility = jvmVersion
7+
tasks.withType<JavaCompile> {
8+
options.release.set(11)
159
}
1610

1711
tasks.withType<KotlinCompile> {
18-
kotlinOptions.jvmTarget = jvmVersionString
12+
kotlinOptions.jvmTarget = "11"
1913
}
20-
21-
val JavaVersion.versionString: String get() = if (majorVersion.toInt() <= 10) "1.$majorVersion" else majorVersion

buildSrc/src/main/kotlin/maven-publish-script.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
val githubProject = "bluefireoly/SimpleKotlinMail"
22

3+
description = "A simple, modern and coroutine based Kotlin Email API, supporting both clientside and serverside projects"
4+
35
plugins {
46
kotlin("jvm")
57
`java-library`
@@ -11,6 +13,11 @@ signing {
1113
sign(publishing.publications)
1214
}
1315

16+
java {
17+
withSourcesJar()
18+
withJavadocJar()
19+
}
20+
1421
publishing {
1522
repositories {
1623
maven("https://oss.sonatype.org/service/local/staging/deploy/maven2") {
Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,19 @@
1-
group = "net.axay"
2-
version = "unspecified"
3-
41
plugins {
2+
`common-build-script`
53
`java-version-script`
6-
7-
kotlin("multiplatform")
8-
}
9-
10-
/**
11-
* DEPENDENCY MANAGEMENT
12-
*/
13-
14-
repositories {
15-
mavenCentral()
16-
jcenter()
174
}
185

19-
kotlin {
20-
jvm {
21-
withJava()
22-
}
23-
24-
sourceSets {
25-
val jvmTest by getting {
6+
dependencies {
7+
implementation(project(":${rootProject.name}-core"))
8+
implementation(project(":${rootProject.name}-client"))
9+
implementation(project(":${rootProject.name}-server"))
10+
implementation(project(":${rootProject.name}-html"))
2611

27-
dependencies {
12+
implementation("org.slf4j:slf4j-simple:1.7.30")
2813

29-
implementation("org.junit.jupiter:junit-jupiter:5.7.0")
30-
31-
implementation(project(":${rootProject.name}-core"))
32-
implementation(project(":${rootProject.name}-client"))
33-
implementation(project(":${rootProject.name}-server"))
34-
implementation(project(":${rootProject.name}-html"))
35-
36-
implementation("org.slf4j:slf4j-simple:1.7.30")
37-
38-
}
39-
40-
}
41-
}
14+
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
4215
}
4316

44-
// JUNIT
45-
46-
tasks.withType<Test> {
17+
tasks.test {
4718
useJUnitPlatform()
4819
}

simplekotlinmail-test/src/jvmTest/kotlin/net/axay/simplekotlinmail/test/ServerClientTest.kt renamed to simplekotlinmail-test/src/test/kotlin/net/axay/simplekotlinmail/test/ServerClientTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class ServerClientTest {
5252
val smtpServer = smtpServer {
5353
setupTLS(
5454
TLSContext(
55-
File("./src/jvmTest/resources/keystore"), "passphrase",
56-
File("./src/jvmTest/resources/truststore"), "passphrase"
55+
File("./src/test/resources/keystore"), "passphrase",
56+
File("./src/test/resources/truststore"), "passphrase"
5757
),
5858
true,
5959
requireClientAuth = false

simplekotlinmail-test/src/jvmTest/kotlin/net/axay/simplekotlinmail/test/ServerTest.kt renamed to simplekotlinmail-test/src/test/kotlin/net/axay/simplekotlinmail/test/ServerTest.kt

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)