Skip to content

Commit

Permalink
Merge branch 'root' into mappings-storage-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Oct 2, 2023
2 parents 835449f + 013533b commit 6fcb953
Show file tree
Hide file tree
Showing 151 changed files with 2,693 additions and 670 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
indent_style = tab
trim_trailing_whitespace = true
max_line_length = 120

[*.yml]
indent_style = space
indent_size = 2
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
enable-beta-ecosystems: true

updates:
- package-ecosystem: "gradle"
directory: "/"

schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"

schedule:
interval: "weekly"
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ on:
- "root"

pull_request:
merge_group:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3

with:
java-version: 1.14
java-version: 17
distribution: temurin

- name: Set up Gradle properties
run: |
Expand All @@ -32,21 +34,21 @@ jobs:
arguments: checkLicenses build

- name: Upload artifact (Extra Module JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Extra Modules)
path: extra-modules/*/build/libs/*.jar

- name: Upload artifact (Main JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Main)
path: kord-extensions/build/libs/*.jar

- name: Upload artifact (Module JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Modules)
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ on:
branches:
- "root"

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3

with:
java-version: 1.14
java-version: 17
distribution: temurin

- name: Set up Kotlin
uses: fwilhe2/setup-kotlin@main
Expand All @@ -42,6 +46,7 @@ jobs:

with:
arguments: checkLicenses build
dependency-graph: generate-and-submit

- name: Disable parallel publish
if: contains(steps.project-version.outputs.version, '-SNAPSHOT')
Expand All @@ -64,21 +69,21 @@ jobs:
arguments: publish --no-parallel

- name: Upload artifact (Extra Module JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Extra Modules)
path: extra-modules/*/build/libs/*.jar

- name: Upload artifact (Main JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Main)
path: kord-extensions/build/libs/*.jar

- name: Upload artifact (Module JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Modules)
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3

with:
java-version: 1.14
java-version: 17
distribution: temurin

- name: Set up Kotlin
uses: fwilhe2/setup-kotlin@main
Expand All @@ -29,7 +30,7 @@ jobs:
echo -e "\nsigning.gnupg.passphrase=${{ secrets.GPG_PASSWORD }}" >> ~/.gradle/gradle.properties
- name: Set up git credentials
uses: oleksiyrudenko/gha-git-credentials@v2-latest
uses: oleksiyrudenko/gha-git-credentials@v2

with:
global: true
Expand Down Expand Up @@ -82,21 +83,21 @@ jobs:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}

- name: Upload artifact (Extra Module JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Extra Modules)
path: extra-modules/*/build/libs/*.jar

- name: Upload artifact (Main JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Main)
path: kord-extensions/build/libs/*.jar

- name: Upload artifact (Module JARs)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

with:
name: JARs (Modules)
Expand Down
6 changes: 0 additions & 6 deletions .idea/kotlinScripting.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion annotation-processor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies {
implementation(libs.kotlin.stdlib)

implementation(libs.koin.core)
implementation(libs.kotlinpoet)
implementation(libs.ksp)

implementation(project(":annotations"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ public class ConverterBuilderClassBuilder : KoinComponent {
ConverterType.COALESCING -> before.add("coalescing")
ConverterType.CHOICE -> after.add("choice")

ConverterType.SINGLE -> { /* Don't add anything */
ConverterType.SINGLE -> {
/* Don't add anything */
}
}
}
Expand Down Expand Up @@ -378,23 +379,3 @@ public fun builderClass(body: ConverterBuilderClassBuilder.() -> Unit): Converte

return builder
}

/** @suppress TODO: Remove this later, it's for testing **/
public fun main() {
println(
builderClass {
name = "enum"
converterClass = "EnumConverter"
argumentType = "E"

builderGeneric = "E: Enum<E>"

builderArg("public var getter: suspend (String) -> E?")

builderField("public lateinit var typeName: String")
builderField("public var bundle: String? = null")

types(ConverterType.COALESCING)
}.result
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,3 @@ public fun builderFunction(body: ConverterBuilderFunctionBuilder.() -> Unit): St

return builder.build()
}

/** @suppress TODO: Remove this later, it's for testing **/
public fun main() {
println(
builderFunction {
functionGeneric = "E: Enum<E>"
builderGeneric = "E: Enum<E>"

argumentType = "E"
converterType = "SingleConverter"

name = "enum"
builderType = "EnumConverterBuilder"

builderArg("getter = { getEnum(it) }")
}
)
}
11 changes: 6 additions & 5 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ repositories {
}

dependencies {
implementation(kotlin("gradle-plugin", version = "1.8.20"))
implementation(kotlin("serialization", version = "1.8.20"))
implementation(kotlin("gradle-plugin", version = "1.9.10"))
implementation(kotlin("serialization", version = "1.9.10"))

implementation("gradle.plugin.org.cadixdev.gradle", "licenser", "0.6.1")
implementation("com.github.ben-manes", "gradle-versions-plugin", "0.47.0")
implementation("com.github.jakemarsden", "git-hooks-gradle-plugin", "0.0.2")
implementation("com.google.devtools.ksp", "com.google.devtools.ksp.gradle.plugin", "1.8.20-1.0.11")
implementation("io.gitlab.arturbosch.detekt", "detekt-gradle-plugin", "1.22.0")
implementation("org.jetbrains.dokka", "dokka-gradle-plugin", "1.8.10")
implementation("com.google.devtools.ksp", "com.google.devtools.ksp.gradle.plugin", "1.9.10-1.0.13")
implementation("io.gitlab.arturbosch.detekt", "detekt-gradle-plugin", "1.23.1")
implementation("org.jetbrains.dokka", "dokka-gradle-plugin", "1.9.0")

implementation(gradleApi())
implementation(localGroovy())
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/kordex-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
kotlin("jvm")
kotlin("plugin.serialization")

id("com.github.ben-manes.versions")
id("io.gitlab.arturbosch.detekt")
id("org.cadixdev.licenser")
}
Expand Down Expand Up @@ -60,7 +61,7 @@ tasks {

detekt {
buildUponDefaultConfig = true
config = files("$rootDir/detekt.yml")
config.from(files("$rootDir/detekt.yml"))

autoCorrect = true
}
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/kotlin/ksp-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ idea { // We use this instead of sourceSets b/c we're all IJ users and this fixe
module {
// Not using += due to https://github.com/gradle/gradle/issues/8749
sourceDirs = sourceDirs +
file("$buildDir/generated/ksp/main/kotlin")
file("${layout.buildDirectory}/generated/ksp/main/kotlin")

testSources.setFrom(
testSources.from + file("$buildDir/generated/ksp/test/kotlin")
testSources.from + file("${layout.buildDirectory}/generated/ksp/test/kotlin")
)

// testSourceDirs = testSourceDirs +
// file("$buildDir/generated/ksp/test/kotlin")

generatedSourceDirs = generatedSourceDirs +
file("$buildDir/generated/ksp/main/kotlin") +
file("$buildDir/generated/ksp/test/kotlin")
file("${layout.buildDirectory}/generated/ksp/main/kotlin") +
file("${layout.buildDirectory}/generated/ksp/test/kotlin")
}
}
Loading

0 comments on commit 6fcb953

Please sign in to comment.