Skip to content

Commit

Permalink
3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
elect86 committed Nov 3, 2023
1 parent eea0754 commit cb721f5
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type value is a `var`, so you can re-use the same instance over and over again
- all the unsigned types implement all the function, including `shl` and `shr` for `Ubyte` and `Ushort`
- there is no automatic padding to integer for unsigned bytes and shorts, so if you add an `Ushort` to another `Ushort` you get an `Ushort` (and not an `Uint`)

<img src="venn.png" width="700">

### Install:

#### mary
Expand Down
15 changes: 7 additions & 8 deletions buildSrc/src/main/kotlin/uns/gen/GenerateCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class GenerateCode : DefaultTask() {

init {
group = "build"
description = "Generate uns code"
description = "Generate code"
}

@get:Inject
Expand All @@ -26,15 +26,12 @@ abstract class GenerateCode : DefaultTask() {
abstract val files: FileSystemOperations

@get:OutputDirectory
val targetDir: Directory = layout.projectDirectory.dir("src/genCommonMain/kotlin")
val targetDir: Directory = layout.projectDirectory.dir("src/commonMainGen/kotlin")

@TaskAction
fun generate() {
files.delete { delete(targetDir) }
Generator.targetDir = targetDir.asFile

files.delete { delete(Generator.targetDir) }
// val targetJvm = targetJvmDir.get().asFile
// val targetNonJvm = targetNonJvmDir.get().asFile
arrays()
types()
extensions()
Expand All @@ -57,8 +54,10 @@ fun generate(file: String, block: Generator.() -> Unit) {
val list = experimentals.joinToString { "${it.pkg}.Experimental${it.name}::class" }
builder.insert(0, "@file:OptIn($list)\n")
}
if (disableNameShadowing) builder.insert(0, "@file:Suppress(\"NAME_SHADOWING\")\n")
if (nothingToInline) builder.insert(0, "@file:Suppress(\"NOTHING_TO_INLINE\")\n")
if (disableNameShadowing)
builder.insert(0, "@file:Suppress(\"NAME_SHADOWING\")\n")
if (nothingToInline)
builder.insert(0, "@file:Suppress(\"NOTHING_TO_INLINE\")\n")
write(file)
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added venn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb721f5

Please sign in to comment.