1 Star 0 Fork 107

留意/RedisFront

forked from dromara/RedisFront 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
build.gradle.kts 8.72 KB
Copy Edit Raw Blame History
westboy authored 2024-05-28 17:03 . fix
@file:Suppress("UNCHECKED_CAST")
import groovy.lang.Closure
import io.github.fvarrui.javapackager.gradle.PackagePluginExtension
import io.github.fvarrui.javapackager.gradle.PackageTask
import io.github.fvarrui.javapackager.model.*
import io.github.fvarrui.javapackager.model.Platform
import org.apache.tools.ant.filters.ReplaceTokens
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
`java-library`
kotlin("jvm") version "2.0.0-RC3"
}
buildscript {
repositories {
mavenLocal()
maven {
url = uri("https://packages.aliyun.com/maven/repository/2048752-snapshot-C7TcE7")
credentials {
username = "662c9a1d2df38b0129acf288"
password = "pub-user"
}
}
maven {
url = uri("https://packages.aliyun.com/maven/repository/2048752-release-f1IHDo")
credentials {
username = "662c9a1d2df38b0129acf288"
password = "pub-user"
}
}
dependencies {
classpath("io.github.fvarrui:javapackager:1.7.5")
}
}
}
plugins.apply("io.github.fvarrui.javapackager.plugin")
allprojects {
repositories {
mavenLocal()
maven {
url = uri("https://packages.aliyun.com/maven/repository/2048752-snapshot-C7TcE7")
credentials {
username = "662c9a1d2df38b0129acf288"
password = "pub-user"
}
}
maven {
url = uri("https://packages.aliyun.com/maven/repository/2048752-release-f1IHDo")
credentials {
username = "662c9a1d2df38b0129acf288"
password = "pub-user"
}
}
}
}
version = "2024.1"
val applicationName: String = "RedisFront"
val organization: String = "dromara.org"
val supportUrl: String = "https://redisfront.dromara.org"
val hutoolVersion = "5.8.10"
val fifesoftVersion = "3.2.0"
val derbyVersion = "10.15.2.0"
val lettuceVersion = "6.2.0.RELEASE"
val logbackVersion = "1.4.1"
val fatJar = false
val requireModules = listOf(
"java.desktop",
"java.prefs",
"java.base",
"java.logging",
"java.sql",
"java.naming"
)
if (JavaVersion.current() < JavaVersion.VERSION_17)
throw RuntimeException("compile required Java ${JavaVersion.VERSION_17}, current Java ${JavaVersion.current()}")
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
println()
println("-------------------------------------------------------------------------------")
println("$name Version: $version")
println("Project Path: $projectDir")
println("Java Version: ${System.getProperty("java.version")}")
println("Gradle Version: ${gradle.gradleVersion} at ${gradle.gradleHomeDir}")
println("Current Date: ${LocalDateTime.now().format(dateTimeFormatter)}")
println("-------------------------------------------------------------------------------")
println()
dependencies {
compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0")
implementation("io.lettuce:lettuce-core:${lettuceVersion}")
implementation("io.netty:netty-common:4.1.82.Final")
implementation("org.jfree:jfreechart:1.5.3")
implementation("cn.hutool:hutool-extra:${hutoolVersion}")
implementation("cn.hutool:hutool-json:${hutoolVersion}")
implementation("cn.hutool:hutool-http:${hutoolVersion}")
implementation("org.apache.derby:derby:${derbyVersion}")
implementation("com.fifesoft:rsyntaxtextarea:${fifesoftVersion}")
implementation("com.fifesoft:rstaui:${fifesoftVersion}")
implementation("ch.qos.logback:logback-classic:${logbackVersion}")
implementation("at.swimmesberger:swingx-core:1.6.8")
implementation("commons-net:commons-net:3.8.0")
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
implementation("com.intellij:forms_rt:7.0.3")
implementation("com.jcraft:jsch:0.1.55")
implementation("com.jcraft:jsch:0.1.55")
implementation("org.dromara:quick-swing:1.1-SNAPSHOT")
implementation(kotlin("stdlib-jdk8"))
}
repositories {
mavenCentral()
}
tasks.test {
useJUnitPlatform()
testLogging.exceptionFormat = TestExceptionFormat.FULL
}
tasks.compileJava {
options.encoding = "utf-8"
options.isDeprecation = false
}
tasks.processResources {
filesMatching("application.properties") {
filter<ReplaceTokens>(
"tokens" to mapOf(
"copyright" to "Copyright © 2022-${LocalDateTime.now().plusYears(1).year} $applicationName",
"version" to "$version"
)
)
}
}
tasks.jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes("Main-Class" to "org.dromara.redisfront.application.Application")
attributes("Implementation-Vendor" to "redisfront.dromara.org")
attributes("Implementation-Copyright" to "redisfront")
attributes("Implementation-Version" to project.version)
attributes("Multi-Release" to "true")
}
exclude("module-info.class")
exclude("META-INF/versions/*/module-info.class")
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.LIST")
exclude("META-INF/*.factories")
if (fatJar) {
from({
configurations.runtimeClasspath.get()
.filter { it.name.endsWith("jar") }
.map {
zipTree(it).matching {
exclude("META-INF/LICENSE")
}
}
})
}
from("${rootDir}/LICENSE") {
into("META-INF")
}
}
configure<PackagePluginExtension> {
mainClass("org.dromara.redisfront.application.Application")
packagingJdk(File(System.getProperty("java.home")))
bundleJre(true)
customizedJre(true)
modules(requireModules)
jreDirectoryName("runtimes")
}
tasks.register<PackageTask>("packageForWindows") {
val innoSetupLanguageMap = LinkedHashMap<String, String>()
innoSetupLanguageMap["Chinese"] = "compiler:Languages\\ChineseSimplified.isl"
innoSetupLanguageMap["English"] = "compiler:Default.isl"
description = "package For Windows"
organizationName = organization
organizationUrl = supportUrl
platform = Platform.windows
isCreateZipball = false
winConfig(closureOf<WindowsConfig> {
icoFile = getIcon("RedisFront.ico")
headerType = HeaderType.gui
originalFilename = applicationName
copyright = applicationName
productName = applicationName
productVersion = version
fileVersion = version
isGenerateSetup = true
setupLanguages = innoSetupLanguageMap
isCreateZipball = true
isGenerateMsi = false
isGenerateMsm = false
msiUpgradeCode = version
isDisableDirPage = false
isDisableFinishedPage = false
isDisableWelcomePage = false
} as Closure<WindowsConfig>)
dependsOn(tasks.build)
}
tasks.register<PackageTask>("packageForLinux") {
description = "package For Linux"
platform = Platform.linux
organizationName = organization
organizationUrl = supportUrl
linuxConfig(
closureOf<LinuxConfig> {
pngFile = getIcon("RedisFront.png")
isGenerateDeb = true
isGenerateRpm = true
isCreateTarball = true
isGenerateInstaller = true
categories = listOf("Office")
} as Closure<LinuxConfig>
)
dependsOn(tasks.build)
}
tasks.register<PackageTask>("packageForMac_arm") {
description = "package For Mac"
platform = Platform.mac
organizationName = organization
organizationUrl = supportUrl
macConfig(
closureOf<MacConfig> {
icnsFile = getIcon("RedisFront.icns")
isGenerateDmg = true
macStartup = MacStartup.ARM64
} as Closure<MacConfig>
)
dependsOn(tasks.build)
}
tasks.register<PackageTask>("packageForMac_x86") {
description = "package For Mac"
platform = Platform.mac
organizationName = organization
organizationUrl = supportUrl
macConfig(
closureOf<MacConfig> {
icnsFile = getIcon("RedisFront.icns")
isGenerateDmg = true
macStartup = MacStartup.X86_64
} as Closure<MacConfig>
)
dependsOn(tasks.build)
}
fun getIcon(fileName: String): File {
return File(projectDir.absolutePath + File.separator + "assets" + File.separator + fileName)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/sdtm1016/RedisFront.git
git@gitee.com:sdtm1016/RedisFront.git
sdtm1016
RedisFront
RedisFront
2024.1

Search