Skip to content

Commit

Permalink
Merge pull request #2 from tegonal/args
Browse files Browse the repository at this point in the history
typed Args with append, dropArgX and withArgX methods
  • Loading branch information
robstoll authored Sep 14, 2023
2 parents 1a444ad + 4fa54f3 commit f932e65
Show file tree
Hide file tree
Showing 78 changed files with 14,184 additions and 29 deletions.
555 changes: 551 additions & 4 deletions build.gradle.kts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gradle/build-logic/dev/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {

api("org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:1.8.20")
api("org.jetbrains.dokka:dokka-base:1.8.20")
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22")
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")

api("ch.tutteli.gradle.plugins.junitjacoco:ch.tutteli.gradle.plugins.junitjacoco.gradle.plugin:4.10.0")
api("ch.tutteli.gradle.plugins.kotlin.module.info:ch.tutteli.gradle.plugins.kotlin.module.info.gradle.plugin:4.10.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id("build-logic.kotlin-jvm")
id("build-logic.dokka")
id("ch.tutteli.gradle.plugins.kotlin.module.info")
id("ch.tutteli.gradle.plugins.publish")
id("build-logic.dokka")
}

tutteliPublish {
Expand Down
18 changes: 9 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
pluginManagement {
repositories {
repositories {
// mavenLocal()
gradlePluginPortal()
}
includeBuild("gradle/build-logic")
includeBuild("gradle/build-logic-conventions")
gradlePluginPortal()
}
includeBuild("gradle/build-logic")
includeBuild("gradle/build-logic-conventions")
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
}
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
}
}

rootProject.name = "minimalist"
148 changes: 148 additions & 0 deletions src/main/generated/kotlin/com/tegonal/minimalist/Args1.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
// -----------------------------------------------------------------------
// automatically generated, don't modify here but in build.gradle.kts
// -----------------------------------------------------------------------
package com.tegonal.minimalist

/**
* Represents an [Args] with 1 argument.
*
* @since 0.1.0
*/
interface Args1<A1>: Args {
/**
* The value of argument 1.
*
* @since 0.1.0
*/
val a1: A1

/**
* The representation of argument 1.
*
* @since 0.1.0
*/
val representation1: String?

/**
* Creates a new [Args1] by coping `this` [Args1] but replaces
* the argument 1 ([Args1.a1]) with the given [value] (and its representation with the given [representation]).
*
* @param value the new value to use for argument 1.
* @param representation the new representation to use for the argument 1 where `null`
* means let the algorithm determine a representation.
*
* @return The newly created [Args1].
*
* @since 0.1.0
*/
fun withArg1(value: A1, representation: String? = null): Args1<A1>


/**
* Creates a new [Args2] by copying `this` [Args1] and appending the given [arg1].
*
* @return The newly created [Args2].
*
* @since 0.1.0
*/
fun <A2> append(
arg1: Args1<A2>
): Args2<A1, A2>


/**
* Creates a new [Args3] by copying `this` [Args1] and appending the given [arg2].
*
* @return The newly created [Args3].
*
* @since 0.1.0
*/
fun <A2, A3> append(
arg2: Args2<A2, A3>
): Args3<A1, A2, A3>


/**
* Creates a new [Args4] by copying `this` [Args1] and appending the given [arg3].
*
* @return The newly created [Args4].
*
* @since 0.1.0
*/
fun <A2, A3, A4> append(
arg3: Args3<A2, A3, A4>
): Args4<A1, A2, A3, A4>


/**
* Creates a new [Args5] by copying `this` [Args1] and appending the given [arg4].
*
* @return The newly created [Args5].
*
* @since 0.1.0
*/
fun <A2, A3, A4, A5> append(
arg4: Args4<A2, A3, A4, A5>
): Args5<A1, A2, A3, A4, A5>


/**
* Creates a new [Args6] by copying `this` [Args1] and appending the given [arg5].
*
* @return The newly created [Args6].
*
* @since 0.1.0
*/
fun <A2, A3, A4, A5, A6> append(
arg5: Args5<A2, A3, A4, A5, A6>
): Args6<A1, A2, A3, A4, A5, A6>


/**
* Creates a new [Args7] by copying `this` [Args1] and appending the given [arg6].
*
* @return The newly created [Args7].
*
* @since 0.1.0
*/
fun <A2, A3, A4, A5, A6, A7> append(
arg6: Args6<A2, A3, A4, A5, A6, A7>
): Args7<A1, A2, A3, A4, A5, A6, A7>


/**
* Creates a new [Args8] by copying `this` [Args1] and appending the given [arg7].
*
* @return The newly created [Args8].
*
* @since 0.1.0
*/
fun <A2, A3, A4, A5, A6, A7, A8> append(
arg7: Args7<A2, A3, A4, A5, A6, A7, A8>
): Args8<A1, A2, A3, A4, A5, A6, A7, A8>


/**
* Creates a new [Args9] by copying `this` [Args1] and appending the given [arg8].
*
* @return The newly created [Args9].
*
* @since 0.1.0
*/
fun <A2, A3, A4, A5, A6, A7, A8, A9> append(
arg8: Args8<A2, A3, A4, A5, A6, A7, A8, A9>
): Args9<A1, A2, A3, A4, A5, A6, A7, A8, A9>


/**
* Creates a new [Args10] by copying `this` [Args1] and appending the given [arg9].
*
* @return The newly created [Args10].
*
* @since 0.1.0
*/
fun <A2, A3, A4, A5, A6, A7, A8, A9, A10> append(
arg9: Args9<A2, A3, A4, A5, A6, A7, A8, A9, A10>
): Args10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>

}
Loading

0 comments on commit f932e65

Please sign in to comment.