Skip to content

Commit ae4a3d6

Browse files
committed
split years into separate gradle packages
1 parent 9e1706b commit ae4a3d6

File tree

217 files changed

+99
-41
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+99
-41
lines changed

build.gradle.kts

+41-38
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,59 @@
11
import io.gitlab.arturbosch.detekt.Detekt
22
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33

4+
buildscript {
5+
repositories {
6+
mavenCentral()
7+
}
8+
}
9+
410
plugins {
5-
kotlin("jvm")
6-
kotlin("plugin.serialization")
7-
id("com.github.gmazzo.buildconfig")
11+
base
12+
kotlin("jvm") apply false
813
id("io.gitlab.arturbosch.detekt")
914
}
1015

11-
group = "net.olegg.aoc"
12-
version = "2022.0.0"
16+
allprojects {
17+
group = "net.olegg.aoc"
18+
version = "2022.0.0"
1319

14-
repositories {
15-
mavenCentral()
16-
}
20+
repositories {
21+
mavenCentral()
22+
}
1723

18-
buildConfig {
19-
packageName(project.group.toString())
20-
buildConfigField("String", "COOKIE", "\"${project.findProperty("COOKIE")?.toString() ?: "Please provide cookie"}\"")
21-
}
24+
apply(plugin = "org.jetbrains.kotlin.jvm")
25+
apply(plugin = "io.gitlab.arturbosch.detekt")
2226

23-
tasks.withType<KotlinCompile> {
24-
kotlinOptions {
25-
jvmTarget = "14"
26-
languageVersion = "1.8"
27-
allWarningsAsErrors = true
28-
freeCompilerArgs += listOf(
29-
"-Xsuppress-version-warnings",
30-
"-opt-in=kotlin.RequiresOptIn",
31-
"-opt-in=kotlin.ExperimentalStdlibApi",
32-
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
33-
"-opt-in=kotlinx.coroutines.FlowPreview",
34-
)
27+
dependencies {
28+
val implementation by configurations
29+
implementation(KotlinX.coroutines.core)
3530
}
36-
}
3731

38-
tasks.withType<Detekt>().configureEach {
39-
jvmTarget = "14"
40-
}
32+
tasks.withType<KotlinCompile> {
33+
kotlinOptions {
34+
jvmTarget = "14"
35+
languageVersion = "1.8"
36+
allWarningsAsErrors = true
37+
freeCompilerArgs += listOf(
38+
"-Xsuppress-version-warnings",
39+
"-opt-in=kotlin.RequiresOptIn",
40+
"-opt-in=kotlin.ExperimentalStdlibApi",
41+
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
42+
"-opt-in=kotlinx.coroutines.FlowPreview",
43+
)
44+
}
45+
}
46+
47+
tasks.withType<Detekt>().configureEach {
48+
jvmTarget = "14"
49+
}
4150

42-
detekt {
43-
config = files("detekt.yml")
44-
baseline = file("detekt-baseline.xml")
51+
detekt {
52+
config = rootProject.files("detekt.yml")
53+
baseline = rootProject.file("detekt-baseline.xml")
54+
}
4555
}
4656

4757
dependencies {
48-
implementation(Kotlin.stdlib.jdk8)
49-
implementation("org.jetbrains.kotlin:kotlin-reflect:_")
50-
implementation(KotlinX.coroutines.core)
51-
implementation(KotlinX.serialization.json)
52-
53-
implementation(Ktor.client.cio)
54-
5558
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:_")
5659
}

core/build.gradle.kts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
plugins {
2+
kotlin("jvm")
3+
id("com.github.gmazzo.buildconfig")
4+
}
5+
6+
buildConfig {
7+
packageName(project.group.toString())
8+
buildConfigField("String", "COOKIE", "\"${project.findProperty("COOKIE")?.toString() ?: "Please provide cookie"}\"")
9+
}
10+
11+
dependencies {
12+
implementation(Kotlin.stdlib.jdk8)
13+
implementation(Ktor.client.cio)
14+
}

settings.gradle.kts

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@ pluginManagement {
55
}
66

77
plugins {
8-
id("de.fayard.refreshVersions") version "0.50.2"
9-
//// # available:"0.51.0"
8+
id("de.fayard.refreshVersions") version "0.51.0"
109
}
1110

1211
rootProject.name = "advent-of-code"
12+
13+
include(
14+
":core",
15+
":year2015",
16+
":year2016",
17+
":year2017",
18+
":year2018",
19+
":year2019",
20+
":year2020",
21+
":year2021",
22+
":year2022",
23+
)

versions.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#### Dependencies and Plugin versions with their available updates.
2-
#### Generated by `./gradlew refreshVersions` version 0.50.2
2+
#### Generated by `./gradlew refreshVersions` version 0.51.0
33
####
44
#### Don't manually edit or split the comments that start with four hashtags (####),
55
#### they will be overwritten by refreshVersions.

year2015/build.gradle.kts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
plugins {
2+
kotlin("plugin.serialization")
3+
}
4+
5+
dependencies {
6+
api(project(":core"))
7+
8+
implementation(KotlinX.serialization.json)
9+
}

year2016/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

year2017/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

year2018/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

year2019/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

year2020/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

year2021/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

year2022/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
api(project(":core"))
3+
}

0 commit comments

Comments
 (0)