Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/artifacts/kcp_for_renlin_js_1_2_1.xml

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

8 changes: 8 additions & 0 deletions .idea/artifacts/kcp_for_renlin_jvm_1_2_1.xml

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

8 changes: 8 additions & 0 deletions .idea/artifacts/kotlin_plugin_js_1_0_0.xml

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

8 changes: 8 additions & 0 deletions .idea/artifacts/kotlin_plugin_jvm_1_0_0.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/kotlinc.xml

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

3 changes: 2 additions & 1 deletion .idea/misc.xml

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

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
16 changes: 14 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# CLAUDE.md

日本語で返答
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## プロジェクト概要

これは特定のアノテーションがついた引数の値を自動生成するKotlin Compiler Plugin (KCP)プロジェクトです。GradleプラグインとKotlinコンパイラプラグインが連携して、指定されたアノテーションが付いた関数内で、`@AutoFill`アノテーションが付いたパラメータの値を自動的に生成・注入します。
これは特定のアノテーションがついた引数の値を自動生成するKotlin Compiler Plugin (KCP)
プロジェクトです。GradleプラグインとKotlinコンパイラプラグインが連携して、指定されたアノテーションが付いた関数内で、
`@AutoFill`アノテーションが付いたパラメータの値を自動的に生成・注入します。

## アーキテクチャ

Expand Down Expand Up @@ -32,31 +35,37 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## 開発コマンド

### ビルド

```bash
./gradlew build
```

### クリーンビルド

```bash
./gradlew clean build
```

### ローカルMavenに公開

```bash
./gradlew publishToMavenLocal
```

### メインアプリケーション実行

```bash
./gradlew run
```

### テスト実行

```bash
./gradlew test
```

### 特定モジュールのビルド

```bash
./gradlew :gradle-plugin:build
./gradlew :kotlin-plugin:build
Expand All @@ -78,7 +87,8 @@ myPlugin {

## 変換対象

プラグインは指定されたアノテーションが付いた関数内で、`@AutoFill`アノテーションが付いたパラメータでnull値が渡された場合に自動的に値を生成・注入します。自動生成される値は`"auto-parameterName-count"`形式です。
プラグインは指定されたアノテーションが付いた関数内で、`@AutoFill`アノテーションが付いたパラメータでnull値が渡された場合に自動的に値を生成・注入します。自動生成される値は
`"auto-parameterName-count"`形式です。

### 使用例

Expand Down Expand Up @@ -117,11 +127,13 @@ fun example() {
### サンプルプロジェクトの実行方法

1. まずプラグインをローカルMavenに公開:

```bash
./gradlew :gradle-plugin:publishToMavenLocal :kotlin-plugin:publishToMavenLocal
```

2. サンプルプロジェクトをビルド・実行:

```bash
cd sample-project
../gradlew run
Expand Down
26 changes: 9 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
kotlin("jvm") version "2.1.0"
kotlin("multiplatform") version "2.0.21" apply false
kotlin("jvm") version "2.0.21" apply false
application
`maven-publish`
signing
Expand Down Expand Up @@ -58,17 +59,8 @@ repositories {
mavenCentral()
}

dependencies {
testImplementation(kotlin("test"))
}

tasks.test {
useJUnitPlatform()
}
// Root project - no source code, only module aggregation

kotlin {
jvmToolchain(8)
}


publishing {
Expand All @@ -85,9 +77,9 @@ publishing {

// Provide artifacts information required by Maven Central
pom {
name = "renlin-router"
description = "routing library for renlin"
url = "https://github.com/Code-Sakura/renlin-router"
name = "renlin-compiler"
description = "Kotlin Compiler Plugin for automatic value injection with @AutoFill annotation"
url = "https://github.com/Code-Sakura/renlin-compiler"
properties = mapOf(
)
licenses {
Expand All @@ -109,9 +101,9 @@ publishing {
}
}
scm {
connection.set("scm:git:https://github.com/Code-Sakura/renlin-router.git")
developerConnection.set("scm:git:https://github.com/Code-Sakura/renlin-router.git")
url.set("https://github.com/Code-Sakura/renlin-router")
connection.set("scm:git:https://github.com/Code-Sakura/renlin-compiler.git")
developerConnection.set("scm:git:https://github.com/Code-Sakura/renlin-compiler.git")
url.set("https://github.com/Code-Sakura/renlin-compiler")
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ gradlePlugin {
}

dependencies {
implementation(kotlin("stdlib", "1.9.0"))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.0")
implementation(kotlin("stdlib", "2.0.21"))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:2.0.21")

compileOnly("com.google.auto.service:auto-service:1.1.1")
annotationProcessor("com.google.auto.service:auto-service:1.1.1")
}

kotlin {
jvmToolchain(8)
jvmToolchain(17)
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RenlinCompilerPlugin : KotlinCompilerPluginSupportPlugin {
override fun getPluginArtifact(): SubpluginArtifact {
return SubpluginArtifact(
groupId = "net.kigawa",
artifactId = "renlin-compiler-kotlin-plugin",
artifactId = "kotlin-plugin",
version = "1.0.0",
)
}
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
kotlin.code.style=official

# Enable toolchain download
org.gradle.java.installations.auto-download=true
Loading