diff --git a/build.gradle b/build.gradle index f68031ebf..3708b5bf3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,22 +1,34 @@ +import org.jetbrains.intellij.platform.gradle.TestFrameworkType +import org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesExtension + plugins { - id 'org.jetbrains.intellij' version "1.16.0" + id 'org.jetbrains.intellij.platform' version "2.0.0" } -dependencies { - testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.6.1' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.3' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.3' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.3' - testCompileOnly 'junit:junit:4.13.1' -} +apply plugin: 'org.jetbrains.intellij.platform' version = "${version}.$buildNumber" + +subprojects { + apply plugin: 'org.jetbrains.intellij.platform.module' +} + + allprojects { repositories { mavenCentral() } + + dependencies { + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.6.1' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.3' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.3' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.3' + testCompileOnly 'junit:junit:4.13.1' + } + apply plugin: 'java' sourceCompatibility = javaVersion targetCompatibility = javaTargetVersion - tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } + tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' } sourceSets { main { @@ -28,12 +40,28 @@ allprojects { } } - apply plugin: 'org.jetbrains.intellij' - intellij { + + intellijPlatform { version = ideaVersion - plugins = ['copyright', 'java'] - downloadSources = Boolean.valueOf(sources) - sameSinceUntilBuild = Boolean.valueOf(isEAP) +// plugins = ['copyright', 'java'] +// downloadSources = Boolean.valueOf(sources) +// sameSinceUntilBuild = Boolean.valueOf(isEAP) + } + + repositories { + intellijPlatform { + defaultRepositories() + } + } + + dependencies { + intellijPlatform { IntelliJPlatformDependenciesExtension ijp -> + ijp.intellijIdeaCommunity("242.20224.91") + ijp.bundledPlugins("com.intellij.copyright", "com.intellij.java") + ijp.instrumentationTools() + ijp.testFramework(TestFrameworkType.Platform.INSTANCE) + ijp.testFramework(TestFrameworkType.Plugin.Java.INSTANCE) + } } def compilationPackages = ['org/intellij/erlang/build/**', 'org/intellij/erlang/jps/**'] @@ -67,7 +95,6 @@ allprojects { } repositories { - jcenter() flatDir { dirs 'libs' } diff --git a/gradle.properties b/gradle.properties index 42d34afea..93ee1f786 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ # https://www.jetbrains.com/intellij-repository/snapshots version = 0.11 -ideaVersion = 241.14494-EAP-CANDIDATE-SNAPSHOT +ideaVersion = 242.20224.92 javaVersion = 17 javaTargetVersion = 17 buildNumber = SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 070cb702f..15de90249 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists