Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin com.diffplug.spotless to v6.25.0 #222

Merged
merged 5 commits into from
Feb 3, 2024
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
4 changes: 2 additions & 2 deletions dsl-style-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks {

kapt {
arguments {
arg("doma.domain.converters", "example.dsl_style_kotlin.domain.DomainConverterProvider")
arg("doma.domain.converters", "example.dsl.style.kotlin.domain.DomainConverterProvider")
}
}

Expand All @@ -38,7 +38,7 @@ java {

spotless {
kotlin {
ktlint("0.38.1")
ktlint("0.48.0")
trimTrailingWhitespace()
endWithNewline()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import org.seasar.doma.jdbc.Config
import org.seasar.doma.jdbc.JdbcLogger
Expand All @@ -10,7 +10,7 @@ class DbConfig(
private val dialect: Dialect,
private val dataSource: DataSource,
private val jdbcLogger: JdbcLogger,
private val transactionManager: TransactionManager
private val transactionManager: TransactionManager,
) : Config {
override fun getJdbcLogger(): JdbcLogger {
return jdbcLogger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.dao
package example.dsl.style.kotlin.dao

import org.seasar.doma.Dao
import org.seasar.doma.Script
Expand Down Expand Up @@ -28,7 +28,7 @@ interface ScriptDao {
insert into employee values(12,'FORD',55,3000,'ANALYST','2008-12-20 12:34:56',3,1,CURRENT_TIMESTAMP,null);
insert into employee values(13,'MILLER',51,1300,'MANAGER','2009-01-20 12:34:56',1,1,CURRENT_TIMESTAMP,null);
insert into employee values(14,'SMITH',410,800,'PRESIDENT','2009-02-20 12:34:56',2,1,CURRENT_TIMESTAMP,null);
"""
""",
)
@Script
fun create()
Expand All @@ -38,7 +38,7 @@ interface ScriptDao {
drop sequence employee_seq;
drop table employee;
drop table department;
"""
""",
)
@Script
fun drop()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.domain
package example.dsl.style.kotlin.domain

class Age(val value: Int) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.domain
package example.dsl.style.kotlin.domain

import org.seasar.doma.ExternalDomain
import org.seasar.doma.jdbc.domain.DomainConverter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.domain
package example.dsl.style.kotlin.domain

import org.seasar.doma.DomainConverters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.domain
package example.dsl.style.kotlin.domain

import org.seasar.doma.Domain

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.entity
package example.dsl.style.kotlin.entity

import org.seasar.doma.Entity
import org.seasar.doma.Id
Expand All @@ -11,8 +11,10 @@ class Department {
@Id
var id: Int? = null
var name: String? = null

@Version
var version: Int? = null

@Transient
val employees: MutableList<Employee> = mutableListOf()
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package example.dsl_style_kotlin.entity
package example.dsl.style.kotlin.entity

import example.dsl_style_kotlin.domain.Age
import example.dsl_style_kotlin.domain.Salary
import example.dsl.style.kotlin.domain.Age
import example.dsl.style.kotlin.domain.Salary
import org.seasar.doma.Column
import org.seasar.doma.Entity
import org.seasar.doma.GeneratedValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.entity
package example.dsl.style.kotlin.entity

import org.seasar.doma.jdbc.entity.EntityListener
import org.seasar.doma.jdbc.entity.PostDeleteContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin.entity
package example.dsl.style.kotlin.entity

enum class JobType {
SALESMAN, MANAGER, ANALYST, PRESIDENT, CLERK
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package example.dsl_style_kotlin.repository
package example.dsl.style.kotlin.repository

import example.dsl_style_kotlin.domain.Age
import example.dsl_style_kotlin.domain.Salary
import example.dsl_style_kotlin.entity.Department_
import example.dsl_style_kotlin.entity.Employee
import example.dsl_style_kotlin.entity.Employee_
import example.dsl.style.kotlin.domain.Age
import example.dsl.style.kotlin.domain.Salary
import example.dsl.style.kotlin.entity.Department_
import example.dsl.style.kotlin.entity.Employee
import example.dsl.style.kotlin.entity.Employee_
import org.seasar.doma.jdbc.Config
import org.seasar.doma.jdbc.criteria.option.LikeOption
import org.seasar.doma.kotlin.jdbc.criteria.KEntityql
Expand Down Expand Up @@ -151,7 +151,7 @@ class EmployeeRepository(config: Config) {
from(d).where {
eq(e.departmentId, d.id)
eq(d.name, departmentName)
}
},
)
}
.fetch()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.seasar.doma.jdbc.Config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.domain.Age
import example.dsl_style_kotlin.domain.Salary
import example.dsl_style_kotlin.entity.Employee
import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.domain.Age
import example.dsl.style.kotlin.domain.Salary
import example.dsl.style.kotlin.entity.Employee
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.seasar.doma.jdbc.Config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.domain.Salary
import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.domain.Salary
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.seasar.doma.jdbc.Config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.domain.Age
import example.dsl_style_kotlin.domain.Salary
import example.dsl_style_kotlin.entity.Employee
import example.dsl_style_kotlin.entity.JobType
import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.domain.Age
import example.dsl.style.kotlin.domain.Salary
import example.dsl.style.kotlin.entity.Employee
import example.dsl.style.kotlin.entity.JobType
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.seasar.doma.jdbc.Config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.domain.Age
import example.dsl_style_kotlin.domain.Salary
import example.dsl_style_kotlin.entity.Employee
import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.domain.Age
import example.dsl.style.kotlin.domain.Salary
import example.dsl.style.kotlin.entity.Employee
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Assertions.assertTrue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import org.junit.jupiter.api.extension.AfterAllCallback
import org.junit.jupiter.api.extension.AfterTestExecutionCallback
Expand All @@ -19,7 +19,7 @@ class TestEnvironment : BeforeAllCallback, AfterAllCallback, BeforeTestExecution
private val jdbcLogger = Slf4jJdbcLogger()
private val transactionManager = LocalTransactionManager(dataSource, jdbcLogger)
private val config = DbConfig(dialect, dataSource, jdbcLogger, transactionManager)
private val dao = example.dsl_style_kotlin.dao.ScriptDaoImpl(config)
private val dao = example.dsl.style.kotlin.dao.ScriptDaoImpl(config)

override fun beforeAll(context: ExtensionContext) {
transactionManager.required { dao.create() }
Expand All @@ -39,14 +39,14 @@ class TestEnvironment : BeforeAllCallback, AfterAllCallback, BeforeTestExecution

override fun supportsParameter(
parameterContext: ParameterContext,
extensionContext: ExtensionContext
extensionContext: ExtensionContext,
): Boolean {
return parameterContext.parameter.type.isAssignableFrom(DbConfig::class.java)
}

override fun resolveParameter(
parameterContext: ParameterContext,
extensionContext: ExtensionContext
extensionContext: ExtensionContext,
): Any {
return config
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package example.dsl_style_kotlin
package example.dsl.style.kotlin

import example.dsl_style_kotlin.entity.JobType
import example.dsl_style_kotlin.repository.EmployeeRepository
import example.dsl.style.kotlin.entity.JobType
import example.dsl.style.kotlin.repository.EmployeeRepository
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
Expand Down
Loading