-
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.
* Start metadata * Updates * Updates * Metadata updates * Updates * upodates * Updates * Updates * Update * Formatting * Updates * Fix * Update version * Add annotations * Fix properties * Bump ver * stable --------- Co-authored-by: BuildTools <[email protected]>
- Loading branch information
1 parent
ff4bcc4
commit 1231270
Showing
23 changed files
with
493 additions
and
37 deletions.
There are no files selected for viewing
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
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
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
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,11 +1,14 @@ | ||
package me.deotime.kpoetdsl | ||
|
||
import com.squareup.kotlinpoet.FileSpec | ||
data class KotlinCode( | ||
val source: String, | ||
val name: String, | ||
val packageName: String, | ||
) { | ||
|
||
class KotlinCode( | ||
override val source: FileSpec | ||
) : Attributes.Sourced<FileSpec> { | ||
private val value = StringBuilder().apply(source::writeTo).toString() | ||
// TODO This is obviously not reliable and should be actually be checked somehow | ||
fun withoutPublic() = copy(source = source.replace("public ", "")) | ||
fun properFormatting() = copy(source = source.replace(" ", "\t")) | ||
|
||
override fun toString() = value | ||
override fun toString() = source | ||
} |
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
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,2 +1,2 @@ | ||
kotlin.code.style=official | ||
version = 1.2.0 | ||
version = 2.0.2 |
Oops, something went wrong.