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 {
40
40
repositories {
41
41
mavenCentral()
42
42
maven(" https://www.jetbrains.com/intellij-repository/releases" )
43
+ maven(" https://www.jetbrains.com/intellij-repository/snapshots" )
43
44
maven(" https://cache-redirector.jetbrains.com/intellij-dependencies" )
44
45
}
45
46
Original file line number Diff line number Diff line change 21
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
* SOFTWARE.
23
23
*/
24
+
25
+ import java.util.*
26
+
24
27
plugins {
25
28
`kotlin- dsl`
26
29
}
27
30
28
31
repositories {
29
32
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
+ }
30
51
}
31
52
32
53
kotlin {
Original file line number Diff line number Diff line change 21
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
* SOFTWARE.
23
23
*/
24
+ import com.intellij.openapi.util.BuildNumber
25
+
24
26
plugins {
25
27
kotlin(" jvm" )
26
28
`maven- publish`
@@ -38,13 +40,21 @@ publishToSpace("java")
38
40
val coroutinesVersion: String by project
39
41
val intellijPlatformVersion: String by project
40
42
43
+ val intelliJVersionRemovedSuffix = intellijPlatformVersion.takeWhile { it.isDigit() || it == ' .' } // in case of EAP
44
+ val intellijPlatformBuildNumber = BuildNumber .fromString(intelliJVersionRemovedSuffix)!!
45
+
41
46
dependencies {
42
47
api(project(" :projector-util-logging" ))
43
48
44
49
implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion " )
45
50
46
51
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
+ }
48
58
49
59
testImplementation(kotlin(" test" ))
50
60
}
You can’t perform that action at this time.
0 commit comments