Skip to content

Convert to Gradle project with Kotlin DSL #5858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ resources/jxbrowser/jxbrowser.properties
**/.idea/gradle.xml
.idea/jarRepositories.xml
.idea/kotlinc.xml
.idea/runConfigurations.xml
**/.idea/modules/
.idea/libraries/Gradle_*.xml
**/.idea/modules.xml
Expand Down
9 changes: 9 additions & 0 deletions .idea/libraries/Dart.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions .idea/runConfigurations/Flutter_Plugin.xml

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/runConfigurations/Flutter_Tests__integration_.xml

This file was deleted.

21 changes: 21 additions & 0 deletions .idea/runConfigurations/flutter_intellij__runIde_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ You can do this online, and it only takes a minute. If you've never submitted co
you must add your (or your organization's) name and contact info to the [AUTHORS](AUTHORS)
file.

NEEDS UPDATING a/o 9 NOV 21

* Install Flutter SDK from [Flutter SDK download](https://flutter.dev/docs/get-started/install) or
[github](https://github.com/flutter/flutter) and set it up according to its instructions.
* Verify installation from the command line:
Expand Down
113 changes: 0 additions & 113 deletions build.gradle

This file was deleted.

106 changes: 106 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/*
* 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")
}
}
}

plugins {
id("org.jetbrains.intellij") version "1.1.4"
id("org.jetbrains.kotlin.jvm") version "1.4.31"
}

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 dartVersion: String by project
val baseVersion: String by project
val name: String by project
val buildSpec: 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)
localPath.set("${project.rootDir.absolutePath}/artifacts/$ide")
downloadSources.set(false)
val pluginList = mutableListOf(
project(":flutter-idea"), "java", "Dart:$dartVersion", "properties",
"junit", "Git4Idea", "Kotlin", "gradle", "org.jetbrains.android",
"Groovy", "smali", "IntelliLang")
if (ide == "android-studio") {
pluginList += listOf(project(":flutter-studio"))
} else if ("$buildSpec" == "2020.3") {
pluginList += listOf("gradle-dsl-impl")
}
plugins.set(pluginList)
}

tasks {
buildSearchableOptions {
enabled = false
}
}

dependencies {
implementation(project("flutter-idea"))
if (ide == "android-studio") {
implementation(project("flutter-studio"))
}
}

tasks {
instrumentCode {
compilerVersion.set("$baseVersion")
}
instrumentTestCode {
compilerVersion.set("$baseVersion")
}
}
2 changes: 2 additions & 0 deletions flutter-idea/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
NEEDS TO BE UPDATED a/o 9 NOV 21

# Gradle Module Structure

This module is a mirror of flutter-intellij (the non-Gradle version) that has sources structured
Expand Down
Loading