This repository was archived by the owner on Mar 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed
Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ subprojects {
4040 repositories {
4141 mavenCentral()
4242 maven(" https://www.jetbrains.com/intellij-repository/releases" )
43+ maven(" https://www.jetbrains.com/intellij-repository/snapshots" )
4344 maven(" https://cache-redirector.jetbrains.com/intellij-dependencies" )
4445 }
4546
Original file line number Diff line number Diff line change 2121 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222 * SOFTWARE.
2323 */
24+
25+ import java.util.*
26+
2427plugins {
2528 `kotlin- dsl`
2629}
2730
2831repositories {
2932 mavenCentral()
33+ maven(" https://www.jetbrains.com/intellij-repository/releases" )
34+ maven(" https://www.jetbrains.com/intellij-repository/snapshots" )
35+ maven(" https://cache-redirector.jetbrains.com/intellij-dependencies" )
36+ }
37+
38+
39+ val gradleProperties = Properties ()
40+ val gradlePropertiesFile = project.file(" ../gradle.properties" )
41+ if (gradlePropertiesFile.canRead()) {
42+ gradleProperties.load(gradlePropertiesFile.inputStream())
43+ }
44+
45+ val intellijPlatformVersion: String by gradleProperties
46+
47+ dependencies {
48+ implementation(" com.jetbrains.intellij.platform:core:$intellijPlatformVersion " ) {
49+ exclude(group = " org.jetbrains.kotlin" ) // cannot find these dependencies
50+ }
3051}
3152
3253kotlin {
Original file line number Diff line number Diff line change 2121 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222 * SOFTWARE.
2323 */
24+ import com.intellij.openapi.util.BuildNumber
25+
2426plugins {
2527 kotlin(" jvm" )
2628 `maven- publish`
@@ -38,13 +40,21 @@ publishToSpace("java")
3840val coroutinesVersion: String by project
3941val intellijPlatformVersion: String by project
4042
43+ val intelliJVersionRemovedSuffix = intellijPlatformVersion.takeWhile { it.isDigit() || it == ' .' } // in case of EAP
44+ val intellijPlatformBuildNumber = BuildNumber .fromString(intelliJVersionRemovedSuffix)!!
45+
4146dependencies {
4247 api(project(" :projector-util-logging" ))
4348
4449 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion " )
4550
4651 compileOnly(" com.jetbrains.intellij.platform:bootstrap:$intellijPlatformVersion " )
47- compileOnly(" com.jetbrains.intellij.platform:util-base:$intellijPlatformVersion " )
52+
53+ if (intellijPlatformBuildNumber >= BuildNumber .fromString(" 213.6461.77" )!! ) {
54+ compileOnly(" com.jetbrains.intellij.platform:util-base:$intellijPlatformVersion " )
55+ } else {
56+ compileOnly(" com.jetbrains.intellij.platform:util-diagnostic:$intellijPlatformVersion " )
57+ }
4858
4959 testImplementation(kotlin(" test" ))
5060}
You can’t perform that action at this time.
0 commit comments