Skip to content

Commit 36dad39

Browse files
igorwojdarenovate[bot]nataliapeterwas10-nyguiguegon
committed
Merge main to develop (#834)
* Upgrade version to 0.13.0 * Update check kttx snippets * Update check kttx snippets * Update check kttx snippets * Update version * Update scripts * Update scripts * Update dev readme * Release `v0.13.0` (#688) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Igor Wojda <igor.wojda@gmail.com> Co-authored-by: NataliaPeterwas <111683562+nataliapeterwas@users.noreply.github.com> Co-authored-by: Jony Sarco <jfe.sarco@gmail.com> * Revert "Release `v0.13.0`" (#689) * Update Konsist in starter projects to Konsist `v0.13.0` (#697) * Update Kotest Snippets (#701) * Replace REGEX to allow using .. as wildcard again (#720) * Update README.md (#771) * Fixed broken link to the getting started guide. (#827) * Fix wrong detection of Git root project dir (#831) Detection never worked before because Git creates directory called '.git', while code was checking 'git'. * Fix test * Disable KMP starter projects --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: NataliaPeterwas <111683562+nataliapeterwas@users.noreply.github.com> Co-authored-by: Jony Sarco <jfe.sarco@gmail.com> Co-authored-by: Guillermo Guerrero González <3263397+guiguegon@users.noreply.github.com> Co-authored-by: Atiq Ur Rehman <6600985@gmail.com> Co-authored-by: Piotr Kubowicz <piotr.kubowicz@gmail.com>
1 parent 39d03e8 commit 36dad39

File tree

8 files changed

+244
-89
lines changed

8 files changed

+244
-89
lines changed

.github/workflows/check-starter-projects.yml

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -506,79 +506,79 @@ jobs:
506506
- name: Run Konsist Test
507507
run: cd samples/starter-projects/konsist-starter-spring-maven-kotest/ && mvn test
508508

509-
konsist-starter-kmp-gradle-kotlin-junit5:
510-
name: Konsist Starter KMP Gradle Kotlin Junit 5
511-
needs: get-github-context
512-
runs-on: ubuntu-latest
513-
if: |
514-
startsWith(needs.get-github-context.outputs.current_branch, 'release/') ||
515-
startsWith(needs.get-github-context.outputs.current_branch, 'renovate/') ||
516-
contains(needs.get-github-context.outputs.current_branch, 'starter-projects') ||
517-
needs.get-github-context.outputs.base_ref_branch == 'main' ||
518-
contains(needs.get-github-context.outputs.all_changed_files, 'samples/starter-projects/')
519-
steps:
520-
- name: Checkout
521-
uses: actions/checkout@v4
522-
523-
- name: Set up JDK
524-
uses: actions/setup-java@v3
525-
with:
526-
java-version: 19
527-
distribution: 'zulu'
528-
529-
- name: Set up Python
530-
uses: actions/setup-python@v4
531-
with:
532-
python-version: '3.11.3'
533-
534-
- name: Add Maven Local Repository
535-
run: python3 scripts/replace_konsist_version/add_maven_local_repository_to_config_file.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-junit5/build.gradle.kts
536-
537-
- name: Replace Konsist Version
538-
run: python3 scripts/replace_konsist_version/replace_konsist_version_gradle_groovy.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-junit5/build.gradle.kts
539-
540-
- name: Publish Konsist Artifact To Local Maven Repository
541-
run: >
542-
./gradlew publishToMavenLocal
543-
544-
- name: Run Konsist Test
545-
run: cd samples/starter-projects/konsist-starter-kmp-gradle-kotlin-junit5/ && ./gradlew test
546-
547-
548-
konsist-starter-kmp-gradle-kotlin-kotest:
549-
name: Konsist Starter KMP Gradle Kotlin KoTest
550-
needs: get-github-context
551-
runs-on: ubuntu-latest
552-
if: |
553-
startsWith(needs.get-github-context.outputs.current_branch, 'release/') ||
554-
startsWith(needs.get-github-context.outputs.current_branch, 'renovate/') ||
555-
contains(needs.get-github-context.outputs.current_branch, 'starter-projects') ||
556-
needs.get-github-context.outputs.base_ref_branch == 'main' ||
557-
contains(needs.get-github-context.outputs.all_changed_files, 'samples/starter-projects/')
558-
steps:
559-
- name: Checkout
560-
uses: actions/checkout@v4
561-
562-
- name: Set up JDK
563-
uses: actions/setup-java@v3
564-
with:
565-
java-version: 19
566-
distribution: 'zulu'
567-
568-
- name: Set up Python
569-
uses: actions/setup-python@v4
570-
with:
571-
python-version: '3.11.3'
572-
573-
- name: Add Maven Local Repository
574-
run: python3 scripts/replace_konsist_version/add_maven_local_repository_to_config_file.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-kotest/build.gradle.kts
575-
576-
- name: Replace Konsist Version
577-
run: python3 scripts/replace_konsist_version/replace_konsist_version_gradle_groovy.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-kotest/build.gradle.kts
578-
579-
- name: Publish Konsist Artifact To Local Maven Repository
580-
run: >
581-
./gradlew publishToMavenLocal
582-
583-
- name: Run Konsist Test
584-
run: cd samples/starter-projects/konsist-starter-kmp-gradle-kotlin-kotest/ && ./gradlew test
509+
# konsist-starter-kmp-gradle-kotlin-junit5:
510+
# name: Konsist Starter KMP Gradle Kotlin Junit 5
511+
# needs: get-github-context
512+
# runs-on: ubuntu-latest
513+
# if: |
514+
# startsWith(needs.get-github-context.outputs.current_branch, 'release/') ||
515+
# startsWith(needs.get-github-context.outputs.current_branch, 'renovate/') ||
516+
# contains(needs.get-github-context.outputs.current_branch, 'starter-projects') ||
517+
# needs.get-github-context.outputs.base_ref_branch == 'main' ||
518+
# contains(needs.get-github-context.outputs.all_changed_files, 'samples/starter-projects/')
519+
# steps:
520+
# - name: Checkout
521+
# uses: actions/checkout@v4
522+
#
523+
# - name: Set up JDK
524+
# uses: actions/setup-java@v3
525+
# with:
526+
# java-version: 19
527+
# distribution: 'zulu'
528+
#
529+
# - name: Set up Python
530+
# uses: actions/setup-python@v4
531+
# with:
532+
# python-version: '3.11.3'
533+
#
534+
# - name: Add Maven Local Repository
535+
# run: python3 scripts/replace_konsist_version/add_maven_local_repository_to_config_file.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-junit5/build.gradle.kts
536+
#
537+
# - name: Replace Konsist Version
538+
# run: python3 scripts/replace_konsist_version/replace_konsist_version_gradle_groovy.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-junit5/build.gradle.kts
539+
#
540+
# - name: Publish Konsist Artifact To Local Maven Repository
541+
# run: >
542+
# ./gradlew publishToMavenLocal
543+
#
544+
# - name: Run Konsist Test
545+
# run: cd samples/starter-projects/konsist-starter-kmp-gradle-kotlin-junit5/ && ./gradlew test
546+
547+
548+
# konsist-starter-kmp-gradle-kotlin-kotest:
549+
# name: Konsist Starter KMP Gradle Kotlin KoTest
550+
# needs: get-github-context
551+
# runs-on: ubuntu-latest
552+
# if: |
553+
# startsWith(needs.get-github-context.outputs.current_branch, 'release/') ||
554+
# startsWith(needs.get-github-context.outputs.current_branch, 'renovate/') ||
555+
# contains(needs.get-github-context.outputs.current_branch, 'starter-projects') ||
556+
# needs.get-github-context.outputs.base_ref_branch == 'main' ||
557+
# contains(needs.get-github-context.outputs.all_changed_files, 'samples/starter-projects/')
558+
# steps:
559+
# - name: Checkout
560+
# uses: actions/checkout@v4
561+
#
562+
# - name: Set up JDK
563+
# uses: actions/setup-java@v3
564+
# with:
565+
# java-version: 19
566+
# distribution: 'zulu'
567+
#
568+
# - name: Set up Python
569+
# uses: actions/setup-python@v4
570+
# with:
571+
# python-version: '3.11.3'
572+
#
573+
# - name: Add Maven Local Repository
574+
# run: python3 scripts/replace_konsist_version/add_maven_local_repository_to_config_file.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-kotest/build.gradle.kts
575+
#
576+
# - name: Replace Konsist Version
577+
# run: python3 scripts/replace_konsist_version/replace_konsist_version_gradle_groovy.py samples/starter-projects/konsist-starter-kmp-gradle-kotlin-kotest/build.gradle.kts
578+
#
579+
# - name: Publish Konsist Artifact To Local Maven Repository
580+
# run: >
581+
# ./gradlew publishToMavenLocal
582+
#
583+
# - name: Run Konsist Test
584+
# run: cd samples/starter-projects/konsist-starter-kmp-gradle-kotlin-kotest/ && ./gradlew test

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ fun `clean architecture layers have correct dependencies`() {
9292
}
9393
```
9494

95+
Check out our [snippet](https://docs.konsist.lemonappdev.com/inspiration/snippets) page for a feast of examples!
96+
9597
## Articles
9698

9799
Read the [Konsist articles](https://docs.konsist.lemonappdev.com/getting-started/getting-started/articles) to gain valuable insights into best practices and strategies for maintaining consistency in your projects.

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
org.gradle.parallel=true
33
org.gradle.daemon=true
44

5-
65
konsist.version=0.13.0

lib/src/test/kotlin/com/lemonappdev/konsist/core/filesystem/rootprovider/GitProjectRootDirResolverTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class GitProjectRootDirResolverTest {
1313
// given
1414
val file = mockk<File>()
1515
val pathVerifier = mockk<PathVerifier>()
16-
every { pathVerifier.verifyPathIfExists(file, "./.git/config") } returns true
17-
every { pathVerifier.verifyPathIfExists(file, "./.git/HEAD") } returns true
18-
every { pathVerifier.verifyPathIfExists(file, "./.git/refs") } returns true
16+
every { pathVerifier.verifyPathIfExists(file, ".git/config") } returns true
17+
every { pathVerifier.verifyPathIfExists(file, ".git/HEAD") } returns true
18+
every { pathVerifier.verifyPathIfExists(file, ".git/refs") } returns true
1919
val sut = GitProjectRootDirResolver(pathVerifier)
2020

2121
// when

samples/starter-projects/konsist-starter-android-gradle-groovy-junit-4/konsistTest/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ dependencies {
3636
// Add JUnit dependency
3737
testImplementation 'junit:junit:4.13.2'
3838

39-
// Add Konsist dependency
4039
testImplementation 'com.lemonappdev:konsist:0.13.0'
40+
41+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
42+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
4143
}

samples/starter-projects/konsist-starter-android-gradle-groovy-junit-5/konsistTest/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ dependencies {
4040

4141
// Add Konsist dependency
4242
testImplementation 'com.lemonappdev:konsist:0.13.0'
43+
44+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
45+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
4346
}
Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,79 @@
11
plugins {
2-
id("com.android.application").version("8.2.2").apply(false)
3-
id("com.android.library").version("8.2.2").apply(false)
4-
kotlin("android").version("1.9.22").apply(false)
5-
kotlin("multiplatform").version("1.9.22").apply(false)
2+
kotlin("multiplatform") version "1.9.20"
3+
application
4+
id("com.android.application")
5+
}
6+
7+
group = "org.example"
8+
version = "1.0-SNAPSHOT"
9+
10+
repositories {
11+
mavenCentral()
12+
mavenLocal()
13+
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
14+
}
15+
16+
kotlin {
17+
jvm {
18+
jvmToolchain(8)
19+
withJava()
20+
testRuns.named("test") {
21+
executionTask.configure {
22+
useJUnitPlatform()
23+
}
24+
}
25+
}
26+
js {
27+
binaries.executable()
28+
browser {
29+
commonWebpackConfig {
30+
cssSupport {
31+
enabled.set(true)
32+
}
33+
}
34+
}
35+
}
36+
sourceSets {
37+
val commonMain by getting
38+
val commonTest by getting {
39+
dependencies {
40+
implementation(kotlin("test"))
41+
}
42+
}
43+
val jvmMain by getting {
44+
dependencies {
45+
implementation("io.ktor:ktor-server-netty:2.3.5")
46+
implementation("io.ktor:ktor-server-html-builder-jvm:2.3.5")
47+
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.10.0")
48+
}
49+
}
50+
val jvmTest by getting {
51+
dependencies {
52+
implementation("com.lemonappdev:konsist:0.13.0")
53+
}
54+
}
55+
56+
val jsMain by getting {
57+
dependencies {
58+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.2.0-pre.346")
59+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.2.0-pre.346")
60+
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.9.3-pre.346")
61+
}
62+
}
63+
val jsTest by getting
64+
}
65+
}
66+
67+
application {
68+
mainClass.set("org.example.application.ServerKt")
69+
}
70+
71+
tasks.named<Copy>("jvmProcessResources") {
72+
val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
73+
from(jsBrowserDistribution)
74+
}
75+
76+
tasks.named<JavaExec>("run") {
77+
dependsOn(tasks.named<Jar>("jvmJar"))
78+
classpath(tasks.named<Jar>("jvmJar"))
679
}
Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,82 @@
11
plugins {
2-
id("com.android.application").version("8.2.2").apply(false)
3-
id("com.android.library").version("8.2.2").apply(false)
4-
kotlin("android").version("1.9.22").apply(false)
5-
kotlin("multiplatform").version("1.9.22").apply(false)
2+
kotlin("multiplatform") version "1.9.10"
3+
id("io.kotest.multiplatform") version "5.7.2"
4+
application
5+
id("com.android.application")
6+
}
7+
8+
group = "org.example"
9+
version = "1.0-SNAPSHOT"
10+
11+
repositories {
12+
mavenCentral()
13+
mavenLocal()
14+
google()
15+
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
16+
}
17+
18+
kotlin {
19+
jvm {
20+
jvmToolchain(8)
21+
withJava()
22+
testRuns.named("test") {
23+
executionTask.configure {
24+
useJUnitPlatform()
25+
}
26+
}
27+
}
28+
js {
29+
binaries.executable()
30+
browser {
31+
commonWebpackConfig {
32+
cssSupport {
33+
enabled.set(true)
34+
}
35+
}
36+
}
37+
}
38+
sourceSets {
39+
val commonMain by getting
40+
val commonTest by getting {
41+
dependencies {
42+
implementation(kotlin("test"))
43+
}
44+
}
45+
val jvmMain by getting {
46+
dependencies {
47+
implementation("io.ktor:ktor-server-netty:2.3.5")
48+
implementation("io.ktor:ktor-server-html-builder-jvm:2.3.5")
49+
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.10.0")
50+
}
51+
}
52+
val jvmTest by getting {
53+
dependencies {
54+
implementation("com.lemonappdev:konsist:0.13.0")
55+
implementation("io.kotest:kotest-runner-junit5:5.7.2")
56+
}
57+
}
58+
59+
val jsMain by getting {
60+
dependencies {
61+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.2.0-pre.346")
62+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.2.0-pre.346")
63+
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.9.3-pre.346")
64+
}
65+
}
66+
val jsTest by getting
67+
}
68+
}
69+
70+
application {
71+
mainClass.set("org.example.application.ServerKt")
72+
}
73+
74+
tasks.named<Copy>("jvmProcessResources") {
75+
val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
76+
from(jsBrowserDistribution)
77+
}
78+
79+
tasks.named<JavaExec>("run") {
80+
dependsOn(tasks.named<Jar>("jvmJar"))
81+
classpath(tasks.named<Jar>("jvmJar"))
682
}

0 commit comments

Comments
 (0)