• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Shenzhen Kaihong Digital.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
<lambda>null16 plugins {
17     id("java")
18     id("org.jetbrains.kotlin.jvm") version "1.9.25"
19     id("org.jetbrains.intellij") version "1.17.4"
20 }
21 
22 group = "com.example"
23 version = "1.0-SNAPSHOT"
24 
<lambda>null25 repositories {
26     mavenCentral()
27 }
28 
29 // Configure Gradle IntelliJ Plugin
30 // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
<lambda>null31 intellij {
32   version.set("2024.1.7")
33   type.set("IC") // Target IDE Platform
34 
35   plugins.set(listOf(/* Plugin Dependencies */))
36 }
37 
<lambda>null38 tasks {
39     // Set the JVM compatibility versions
40     withType<JavaCompile> {
41         sourceCompatibility = "17"
42         targetCompatibility = "17"
43     }
44     withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
45         kotlinOptions.jvmTarget = "17"
46     }
47 
48     patchPluginXml {
49         sinceBuild.set("241")
50         untilBuild.set("243.*")
51     }
52 
53     signPlugin {
54         certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
55         privateKey.set(System.getenv("PRIVATE_KEY"))
56         password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
57     }
58 
59     publishPlugin {
60         token.set(System.getenv("PUBLISH_TOKEN"))
61     }
62 }
63 
<lambda>null64 tasks.test {
65     useJUnitPlatform()
66 }
67 
<lambda>null68 dependencies {
69     implementation("org.antlr:antlr4-runtime:4.13.2")
70     testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")  // JUnit 5 API
71     testImplementation("org.junit.vintage:junit-vintage-engine") {
72         exclude(group = "junit", module = "junit")
73     }
74     testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") // 必须的运行时引擎
75     implementation("com.google.code.gson:gson:2.10.1")
76 }
77 
78