Skip to content

Commit 65227ad

Browse files
committed
resolve TODOs for 0.19.0 expect for publishing
1 parent 780649d commit 65227ad

File tree

54 files changed

+92
-428
lines changed

Some content is hidden

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

54 files changed

+92
-428
lines changed

apis/infix-en_GB/atrium-api-infix-en_GB/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureWorstCaseTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package ch.tutteli.atrium.api.infix.en_GB
44

55
import ch.tutteli.atrium.api.verbs.internal.expect
6-
//TODO 0.19.0 complains we are not in common module but we are. Check if error disappears once we use the default src folder
76
import kotlin.js.JsName
87

98
class WorstCase {

atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//TODO 0.19.0 rename package to proofWithHelpOnFailure when we rename DescriptiveAssertionWithFailureHint to ProofWithHelpOnFailure
1+
//TODO 0.20.0 rename package to proofWithHelpOnFailure when we rename DescriptiveAssertionWithFailureHint to ProofWithHelpOnFailure
22
package ch.tutteli.atrium.assertions.builders.impl.descriptiveWithFailureHint
33

44
import ch.tutteli.atrium.assertions.Assertion

atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/AssertionContainer.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import kotlin.reflect.KClass
1919
*
2020
* @param T The type of the subject of `this` expectation.
2121
*/
22-
//TODO 0.19.0 introduce ProofContainer
22+
//TODO 0.20.0 introduce ProofContainer
2323
interface AssertionContainer<T> {
2424
/**
2525
* Either [Some] wrapping the subject of an [Assertion] or [None] in case a previous subject transformation
@@ -32,8 +32,8 @@ interface AssertionContainer<T> {
3232
*
3333
* Might be we completely remove it without prior notice.
3434
*/
35-
//TODO 0.19.0/0.20.0 maybe it would be better to have proofFactories as val like we have components?
36-
//TODO 0.19.0 I guess it would make sense to get rid of getImpl and only use the ComponentFactoryContainer approach
35+
//TODO 0.20.0/0.21.0 maybe it would be better to have proofFactories as val like we have components?
36+
//TODO 0.20.0 I guess it would make sense to get rid of getImpl and only use the ComponentFactoryContainer approach
3737
// however, check if extensibility for a library author is still given. We don't want that a consumer of a third-party
3838
// expectation function collection-library needs to use an own expectation verb
3939
@ExperimentalNewExpectTypes
@@ -99,7 +99,7 @@ interface AssertionContainer<T> {
9999
*
100100
* @return an [Expect] for the subject of `this` expectation.
101101
*/
102-
//TODO remove SUPPRESS with 0.19.0 once the toExpect function is in core
102+
//TODO remove SUPPRESS with 0.20.0 once the toExpect function is in core
103103
@Suppress("UNCHECKED_CAST")
104104
fun createAndAppend(description: Translatable, expected: Any?, test: (T) -> Boolean): Expect<T> =
105105
append(

atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,13 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
66
* Contains translations which are used in error like messages.
77
*/
88
enum class ErrorMessages(override val value: String) : StringBasedTranslatable {
9-
@Deprecated(
10-
"USE AT_LEAST_ONE_EXPECTATION_DEFINED, will be removed with 0.19.0",
11-
ReplaceWith("AT_LEAST_ONE_EXPECTATION_DEFINED")
12-
)
13-
AT_LEAST_ONE_ASSERTION_DEFINED("at least one assertion defined"),
149

1510
/** @since 0.18.0 */
1611
AT_LEAST_ONE_EXPECTATION_DEFINED("at least one expectation defined"),
1712

18-
@Deprecated(
19-
"USE FORGOT_DO_DEFINE_EXPECTATION, will be removed with 0.19.0",
20-
ReplaceWith("FORGOT_DO_DEFINE_EXPECTATION")
21-
)
22-
FORGOT_DO_DEFINE_ASSERTION("You forgot to define assertions in the assertionCreator-lambda"),
23-
2413
/** @since 0.18.0 */
2514
FORGOT_DO_DEFINE_EXPECTATION("You forgot to define expectations in the expectationCreator-lambda"),
2615

27-
@Deprecated(
28-
"USE HINT_AT_LEAST_ONE_EXPECTATION_DEFINED, will be removed with 0.19.0",
29-
ReplaceWith("HINT_AT_LEAST_ONE_EXPECTATION_DEFINED")
30-
)
31-
HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"),
32-
3316
/** @since 0.18.0 */
3417
HINT_AT_LEAST_ONE_EXPECTATION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"),
3518
}

atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class BaseExpectImpl<T>(
1818
) : ExpectInternal<T> {
1919

2020

21-
// TODO 0.19.0 not every expect should have an own implFactories but only the root,
21+
// TODO 0.20.0 not every expect should have an own implFactories but only the root,
2222
// maybe also FeatureExpect but surely not DelegatingExpect or CollectingExpect
2323
private val implFactories: MutableMap<KClass<*>, (() -> Nothing) -> () -> Any> = mutableMapOf()
2424

@@ -36,7 +36,7 @@ abstract class BaseExpectImpl<T>(
3636
implFactories[kClass] = implFactory
3737
}
3838

39-
//TODO 0.19.0 move to RootExpectOptions?
39+
//TODO 0.20.0 move to RootExpectOptions?
4040
inline fun <reified I : Any> withImplFactory(noinline implFactory: (oldFactory: () -> I) -> () -> I) {
4141
registerImpl(I::class, implFactory)
4242
}

atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/FeatureExpectImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal class FeatureExpectImpl<T, R>(
5353
}
5454

5555
override val components: ComponentFactoryContainer
56-
// TODO 0.19.0 the function to turn an Expect into a ProofContainer should be located in core
56+
// TODO 0.20.0 the function to turn an Expect into a ProofContainer should be located in core
5757
get() = (previousExpect as AssertionContainer<*>).components
5858

5959
override fun append(assertion: Assertion): Expect<R> {

build.gradle

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
2+
import java.nio.file.Files
3+
import java.nio.file.Paths
4+
import java.util.stream.Collectors
15

26
buildscript {
37
rootProject.version = '0.19.0-SNAPSHOT'
@@ -18,8 +22,7 @@ buildscript {
1822
junitPlatformVersion = '1.9.1'
1923
jupiterVersion = '5.9.1'
2024
spekVersion = '2.0.12'
21-
//TODO 0.19.0 check if we can already update to kotestVersion = '4.6.4'
22-
kotestVersion = '4.3.2'
25+
kotestVersion = '4.6.4'
2326
spekExtensionsVersion = '1.2.1'
2427
spekExtensions = { "ch.tutteli.spek:tutteli-spek-extensions:$spekExtensionsVersion" }
2528
mockkVersion = '1.10.0'
@@ -35,8 +38,7 @@ buildscript {
3538
// release
3639
gradle_nexus_publish_plugin_version = '1.1.0'
3740

38-
//TODO 0.19.0 add all modules and remove this afterwards
39-
newMultiplatformProjectNames = [
41+
multiplatformProjectNames = [
4042
"core",
4143
"logic", "logic-kotlin_1_3",
4244
"translations-en_GB", "translations-de_CH",
@@ -153,8 +155,8 @@ subprojects {
153155

154156

155157

156-
def newMultiplatformProjects = newMultiplatformProjectNames.collect { prefixedProject(it) }
157-
configure(newMultiplatformProjects) { subproject ->
158+
def multiplatformProjects = multiplatformProjectNames.collect { prefixedProject(it) }
159+
configure(multiplatformProjects) { subproject ->
158160
apply plugin: "kotlin-multiplatform"
159161

160162
kotlin {
@@ -247,14 +249,14 @@ configure(newMultiplatformProjects) { subproject ->
247249
}
248250
}
249251

250-
//TODO 0.19.0 update tutteli-gradle-plugins and remove as this is handled there
252+
//TODO 0.20.0 update tutteli-gradle-plugins and remove as this is handled there
251253
// calling the Kotlin extension function in buildSrc
252254
ConfigureTestTasksKt.configureTestTasks(subproject)
253255

254256
sourceCompatibility = 11
255257
targetCompatibility = 11
256258

257-
//TODO 0.19.0 update tutteli-gradle-plugins and remove as this is handled there and allows to use the normal java/ directory instead of module/
259+
//TODO 0.20.0 update tutteli-gradle-plugins and remove as this is handled there and allows to use the normal java/ directory instead of module/
258260
def moduleInfoReplaceMe = {
259261
if (subproject.components.findByName('java') == null) throw new IllegalStateException("""\
260262
Could not find the java component.
@@ -300,12 +302,10 @@ tasks.withType(KotlinCompile).configureEach {
300302
}
301303
}
302304

303-
//TODO 0.19.0 cleanup this file once we have transitioned all modules to the new MPP plugin
304-
305305
configure(subprojects.findAll {
306306
def parentName = it.projectDir.parentFile.name
307307
it.name != "bc-tests" && parentName != "old" && parentName != "bc-tests"
308-
} - newMultiplatformProjects) { subproject ->
308+
} - multiplatformProjects) { subproject ->
309309
apply plugin: 'kotlin'
310310
dependencies {
311311
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
@@ -345,8 +345,8 @@ configure(subprojects.findAll {
345345
//}
346346

347347

348-
//TODO 0.19.0 configure dokka plugins again also for newMultiplatformProjects
349-
configure(subprojects - toolProjects - newMultiplatformProjects) { Project subproject ->
348+
//TODO 0.19.0 configure dokka plugins again also for multiplatformProjects
349+
configure(subprojects - toolProjects - multiplatformProjects) { Project subproject ->
350350
apply plugin: 'ch.tutteli.dokka'
351351
apply plugin: 'ch.tutteli.kotlin.module.info'
352352

@@ -391,8 +391,8 @@ configure(apiProjects) { apiProject ->
391391

392392
def bundleSmokeTests = subprojects.findAll { it.name.contains('-smoke-test') }
393393

394-
//TODO 0.19.0 newMultiPlatformProject have to be published differently, update to tutteli-gradle-plugins
395-
configure(subprojects - bundleSmokeTests - toolProjects - newMultiplatformProjects) { subproject ->
394+
//TODO 0.19.0 multiplatformProjects have to be published differently, update to tutteli-gradle-plugins
395+
configure(subprojects - bundleSmokeTests - toolProjects - multiplatformProjects) { subproject ->
396396
apply plugin: 'ch.tutteli.publish'
397397

398398
tutteliPublish {
@@ -401,7 +401,7 @@ configure(subprojects - bundleSmokeTests - toolProjects - newMultiplatformProjec
401401
}
402402

403403
//TODO 0.19.0 spek is used in another way, see above, but we have not yet applied the jacoco plugin
404-
configure(jacocoMulti.jacocoProjects + getAndroidProjects() - newMultiplatformProjects) {
404+
configure(jacocoMulti.jacocoProjects - multiplatformProjects) {
405405
apply plugin: 'ch.tutteli.spek'
406406
spek.version = spekVersion
407407

@@ -438,8 +438,8 @@ configure(jacocoMulti.jacocoProjects + getAndroidProjects() - newMultiplatformPr
438438
}
439439

440440

441-
// this is already configured for newMultiplatformProjects further above, thus the substraction
442-
configure(subprojects - toolProjects - newMultiplatformProjects) {
441+
// this is already configured for multiplatformProjects further above, thus the substraction
442+
configure(subprojects - toolProjects - multiplatformProjects) {
443443
sourceSets.configureEach {
444444
languageSettings {
445445
useExperimentalAnnotation('kotlin.Experimental')
@@ -481,12 +481,6 @@ configure(bundleSmokeTests) {
481481
}
482482
}
483483

484-
485-
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
486-
import java.nio.file.Files
487-
import java.nio.file.Paths
488-
import java.util.stream.Collectors
489-
490484
def getSubprojectTasks(String name) {
491485
return subprojects.collect { it.tasks.findByName(name) }.findAll { it != null }
492486
}

gradle/scripts/check-dexer.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ def preCheck_ATRIUM_ANDROID_JAR = task('preCheck_ATRIUM_ANDROID_JAR') {
77
}
88
}
99

10-
def newMultiplatformProjects = newMultiplatformProjectNames.collect { prefixedProject(it) }
11-
def dexerProjects = newMultiplatformProjects.findAll {
10+
def multiplatformProjects = multiplatformProjectNames.collect { prefixedProject(it) }
11+
def dexerProjects = multiplatformProjects.findAll {
1212
!it.name.contains("-specs")
1313
}
1414
configure(dexerProjects) { subproject ->

gradle/scripts/gh-pages.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ task removeGhPages {
2525
}
2626

2727
//TODO 0.19.0 configure dokka differently
28-
def newMultiplatformProjects = newMultiplatformProjectNames.collect { prefixedProject(it) }
29-
def projectsToConsider = docProjects - newMultiplatformProjects
28+
def multiplatformProjects = multiplatformProjectNames.collect { prefixedProject(it) }
29+
def projectsToConsider = docProjects - multiplatformProjects
3030

3131
task ghPages {
3232
projectsToConsider.forEach { subProject ->

logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/ListAssertions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder
88
* Collection of assertion functions and builders which are applicable to subjects with a [List] type.
99
*/
1010
interface ListAssertions {
11-
//TODO 0.19.0 change to ListLike in order that it works as well for arrays
11+
//TODO 0.20.0 change to ListLike in order that it works as well for arrays
1212
fun <E, T : List<E>> get(container: AssertionContainer<T>, index: Int): FeatureExtractorBuilder.ExecutionStep<T, E>
1313
}

0 commit comments

Comments
 (0)