-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from tegonal/args
typed Args with append, dropArgX and withArgX methods
- Loading branch information
Showing
78 changed files
with
14,184 additions
and
29 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
gradle/build-logic/publishing/src/main/kotlin/build-logic.published-kotlin-jvm.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
148
src/main/generated/kotlin/com/tegonal/minimalist/Args1.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
||
} |
Oops, something went wrong.