加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle.kts 3.18 KB
一键复制 编辑 原始数据 按行查看 历史
/*
* Copyright 2019 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
buildscript {
repositories {
mavenCentral()
maven {
url=uri("https://www.jetbrains.com/intellij-repository/snapshots/")
}
maven {
url=uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
maven {
url=uri("https://www.jetbrains.com/intellij-repository/releases")
}
gradlePluginPortal()
}
}
plugins {
id("org.jetbrains.intellij") version "1.17.3"
id("org.jetbrains.kotlin.jvm") version "2.0.0"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url=uri("https://www.jetbrains.com/intellij-repository/snapshots/")
}
maven {
url=uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
maven {
url=uri("https://www.jetbrains.com/intellij-repository/releases")
}
}
// Specify UTF-8 for all compilations so we avoid Windows-1252.
allprojects {
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Test> {
systemProperty("file.encoding", "UTF-8")
}
}
val ide: String by project
val flutterPluginVersion: String by project
val javaVersion: String by project
val androidVersion: String by project
val dartVersion: String by project
val baseVersion: String by project
val name: String by project
val buildSpec: String by project
val smaliPlugin: String by project
val langPlugin: String by project
val ideVersion: String by project
group = "io.flutter"
version = flutterPluginVersion
java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
}
intellij {
pluginName.set(name)
// This adds nullability assertions, but also compiles forms.
instrumentCode.set(true)
updateSinceUntilBuild.set(false)
version.set(ideVersion)
downloadSources.set(false)
val pluginList = mutableListOf(
project(":flutter-idea"), "java", "properties",
"junit", "Git4Idea", "Kotlin", "gradle",
"Groovy", "Dart:$dartVersion")
// If 2023.3+ and IDEA (not AS), then "org.jetbrains.android:$androidVersion", otherwise "org.jetbrains.android",
// see https://github.com/flutter/flutter-intellij/issues/7145
if(ide == "android-studio") {
pluginList.add("org.jetbrains.android")
} else if (ide == "ideaIC") {
pluginList.add("org.jetbrains.android:$androidVersion")
}
if (ide == "android-studio") {
pluginList.add(smaliPlugin)
}
pluginList.add(langPlugin)
if (ide == "android-studio") {
type.set("AI")
pluginList += listOf(project(":flutter-studio"))
}
plugins.set(pluginList)
}
tasks {
buildSearchableOptions {
enabled = false
}
prepareSandbox {
dependsOn(":flutter-idea:prepareSandbox")
if (ide == "android-studio") {
dependsOn(":flutter-studio:prepareSandbox")
}
}
}
dependencies {
implementation(project("flutter-idea", "instrumentedJar")) // Second arg is required to use forms
if (ide == "android-studio") {
implementation(project("flutter-studio"))
}
}
tasks {
instrumentCode {
compilerVersion.set(baseVersion)
}
instrumentTestCode {
compilerVersion.set(baseVersion)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化