buildscript {
    repositories {
        maven {
            url uri('../../repo')
        }
        maven { url 'https://jitpack.io' }
    }
    dependencies{
        classpath 'com.github.122006.Zircon:gradle:master-SNAPSHOT'
    }
}

plugins {
    id 'java'
    id 'org.jetbrains.intellij.platform' version '2.6.0'
}
apply plugin: 'zircon'

group 'com.by122006.zircon'
version '4.3'

compileJava {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}
buildPlugin {
    buildSearchableOptions.enabled = false
}

repositories {
    maven {
        url uri('../../repo')
    }
    intellijPlatform {
        defaultRepositories()
    }
    maven { url 'https://jitpack.io' }
    maven { url 'https://maven.aliyun.com/repository/public/' }
    mavenCentral()

}
patchPluginXml {
    sinceBuild = "212.*"
    untilBuild = "251.*"
}
dependencies {
    intellijPlatform {
        intellijIdeaCommunity '2022.3'
//        intellijIdeaCommunity '251.21418.62'
        bundledPlugin 'com.intellij.java'
        instrumentationTools()
    }
    implementation('com.github.122006:ExMethodUtil:1.1.8')
    implementation project(":ijplugin")
}

tasks.withType(JavaCompile) {
    it.options.compilerArgs << "-Xplugin:ZrExMethod"
    it.options.compilerArgs << "-Xplugin:ZrString"
    it.options.fork = true
}

