plugins { id 'org.springframework.boot' version '3.2.5' id 'io.spring.dependency-management' version '1.1.4' id 'java' } group = 'com.kaidi' version = providers.gradleProperty('releaseVersion') .orElse(System.getenv('ERP_RELEASE_VERSION') ?: '0.1.0') .get() def productionBuild = providers.gradleProperty('productionBuild') .map { it.toBoolean() } .orElse(false) java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-validation' // Real-time collaboration (yjs CRDT relay) over WebSocket. implementation 'org.springframework.boot:spring-boot-starter-websocket' // Production database and versioned schema migrations. implementation 'org.flywaydb:flyway-core:10.22.0' runtimeOnly 'org.flywaydb:flyway-database-postgresql:10.22.0' runtimeOnly 'org.postgresql:postgresql' // SQLite remains available to source-tree development and tests, but is // deliberately absent from PostgreSQL-only production release artifacts. if (!productionBuild.get()) { runtimeOnly 'org.xerial:sqlite-jdbc:3.45.3.0' runtimeOnly 'org.hibernate.orm:hibernate-community-dialects' } // jackson-databind arrives transitively via starter-web; declared for clarity. implementation 'com.fasterxml.jackson.core:jackson-databind' // jsoup —— 富文本写入时的服务端 HTML 白名单净化(HtmlSanitizer)。像浏览器一样解析、 // 解码 HTML 实体后再按白名单判定标签/属性/协议,根除正则消毒被实体编码(: 等)绕过的整类 XSS。 implementation 'org.jsoup:jsoup:1.22.2' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() } springBoot { buildInfo() }