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
27 changes: 6 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,15 @@ jobs:
distribution: 'zulu'
java-version: 21

- name: Grant execute permission for compile-java-test/gradlew
working-directory: ./compile-java-test
- name: Grant execute permission for compile/gradlew
working-directory: ./compile
run: chmod +x gradlew

- name: Grant execute permission for compile-kotlin-test/gradlew
working-directory: ./compile-kotlin-test
run: chmod +x gradlew

- name: Grant execute permission for compile-mix-test/gradlew
working-directory: ./compile-mix-test
run: chmod +x gradlew

- name: Build plugin
run: ./gradlew build

- name: Test plugin against Java
working-directory: ./compile-java-test
run: ./gradlew build

- name: Test plugin against Kotlin
working-directory: ./compile-kotlin-test
- name: Build compile-plugin
working-directory: ./compile
run: ./gradlew build

- name: Test plugin against a mix of Java and Kotlin
working-directory: ./compile-mix-test
- name: Test
run: ./gradlew build

- name: Set version
Expand All @@ -55,5 +39,6 @@ jobs:
run: echo ${{ steps.set-version.outputs.version }}

- name: Publish plugin
working-directory: ./compile
if: github.event_name == 'push' && endsWith(steps.set-version.outputs.version, 'SNAPSHOT') == false
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/.metadata
/.idea/
.factorypath
/.claude/
23 changes: 7 additions & 16 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,14 @@ The Doma Compile Plugin is a Gradle plugin that allows annotation processors to

### Building the Plugin
```bash
./gradlew build
cd compile && ./gradlew build && cd ..
```

### Running Tests
The plugin has three test suites that must be run in sequence:
The plugin has three test suites:
```bash
# Build the plugin first
# Build the all test projects
./gradlew build

# Test with Java
cd compile-java-test && ./gradlew build && cd ..

# Test with Kotlin
cd compile-kotlin-test && ./gradlew build && cd ..

# Test with mixed Java/Kotlin
cd compile-mix-test && ./gradlew build && cd ..
```

### Code Formatting
Expand All @@ -37,17 +28,17 @@ cd compile-mix-test && ./gradlew build && cd ..

### Running a Single Test
```bash
# In any test directory (compile-java-test, compile-kotlin-test, or compile-mix-test)
./gradlew test --tests "example.GenerationTest"
# With any test project (compile-java-test, compile-kotlin-test, or compile-mix-test)
./gradlew :compile-java-test:test --tests "example.GenerationTest"
```

### Publishing (for maintainers)
```bash
# Release a new version (from master branch only)
./gradlew release
cd compile && ./gradlew release && cd ..

# Publish to Gradle Plugin Portal (handled by CI for non-SNAPSHOT versions)
./gradlew publishPlugins -Pgradle.publish.key=<key> -Pgradle.publish.secret=<secret>
cd compile && ./gradlew publishPlugins -Pgradle.publish.key=<key> -Pgradle.publish.secret=<secret> && cd..
```

## Architecture
Expand Down
25 changes: 12 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
plugins {
java
id("net.researchgate.release") version "3.1.0"
alias(libs.plugins.spotless)
}

configure<net.researchgate.release.ReleaseExtension> {
newVersionCommitMessage.set("[Gradle Release Plugin] - [skip ci] new version commit: ")
tagTemplate.set("v\$version")
git {
requireBranch.set("master")
}
}
val catalog = libs

allprojects {
apply(plugin = "java")
tasks {
test {
useJUnitPlatform()
apply(plugin = catalog.plugins.spotless.get().pluginId)

spotless {
java {
googleJavaFormat(libs.versions.google.java.format.get())
}
}
}

repositories {
mavenCentral()
}
}
38 changes: 8 additions & 30 deletions compile-java-test/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
dependencies {
classpath("org.domaframework.doma:compile")
}
}

plugins {
id("java")
java
id("org.domaframework.doma.compile")
}

val domaVersion = "3.9.1"

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
toolchain.languageVersion.set(JavaLanguageVersion.of(libs.versions.java.get().toInt()))
}

tasks {
Expand All @@ -28,20 +14,12 @@ tasks {
}
}

repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}

dependencies {
annotationProcessor("org.seasar.doma:doma-processor:$domaVersion")
implementation("org.seasar.doma:doma-core:$domaVersion")
annotationProcessor(libs.doma.processor)
implementation(libs.doma.core)
// Use JUnit BOM for version management
testImplementation(platform("org.junit:junit-bom:5.13.2"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine)
testRuntimeOnly(libs.junit.platform.launcher)
}
Binary file removed compile-java-test/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions compile-java-test/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

183 changes: 0 additions & 183 deletions compile-java-test/gradlew

This file was deleted.

Loading