Skip to content

Commit 10fb2dd

Browse files
authored
Convert to Gradle project with Kotlin DSL (#5858)
* Convert to Gradle project with Kotlin DSL
1 parent c045a53 commit 10fb2dd

File tree

700 files changed

+416
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

700 files changed

+416
-528
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ resources/jxbrowser/jxbrowser.properties
2727
**/.idea/gradle.xml
2828
.idea/jarRepositories.xml
2929
.idea/kotlinc.xml
30+
.idea/runConfigurations.xml
3031
**/.idea/modules/
3132
.idea/libraries/Gradle_*.xml
3233
**/.idea/modules.xml

.idea/libraries/Dart.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

-8
This file was deleted.

.idea/runConfigurations.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Flutter_Plugin.xml

-11
This file was deleted.

.idea/runConfigurations/Flutter_Tests__integration_.xml

-22
This file was deleted.

.idea/runConfigurations/flutter_intellij__runIde_.xml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ You can do this online, and it only takes a minute. If you've never submitted co
1010
you must add your (or your organization's) name and contact info to the [AUTHORS](AUTHORS)
1111
file.
1212

13+
NEEDS UPDATING a/o 9 NOV 21
14+
1315
* Install Flutter SDK from [Flutter SDK download](https://flutter.dev/docs/get-started/install) or
1416
[github](https://github.com/flutter/flutter) and set it up according to its instructions.
1517
* Verify installation from the command line:

build.gradle

-113
This file was deleted.

build.gradle.kts

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* Copyright 2019 The Chromium Authors. All rights reserved.
3+
* Use of this source code is governed by a BSD-style license that can be
4+
* found in the LICENSE file.
5+
*/
6+
7+
buildscript {
8+
repositories {
9+
mavenCentral()
10+
maven {
11+
url=uri("https://www.jetbrains.com/intellij-repository/snapshots/")
12+
}
13+
maven {
14+
url=uri("https://oss.sonatype.org/content/repositories/snapshots/")
15+
}
16+
maven {
17+
url=uri("https://www.jetbrains.com/intellij-repository/releases")
18+
}
19+
}
20+
}
21+
22+
plugins {
23+
id("org.jetbrains.intellij") version "1.1.4"
24+
id("org.jetbrains.kotlin.jvm") version "1.4.31"
25+
}
26+
27+
repositories {
28+
mavenLocal()
29+
mavenCentral()
30+
maven {
31+
url=uri("https://www.jetbrains.com/intellij-repository/snapshots/")
32+
}
33+
maven {
34+
url=uri("https://oss.sonatype.org/content/repositories/snapshots/")
35+
}
36+
maven {
37+
url=uri("https://www.jetbrains.com/intellij-repository/releases")
38+
}
39+
}
40+
41+
// Specify UTF-8 for all compilations so we avoid Windows-1252.
42+
allprojects {
43+
tasks.withType<JavaCompile>() {
44+
options.encoding = "UTF-8"
45+
}
46+
tasks.withType<Test>() {
47+
systemProperty("file.encoding", "UTF-8")
48+
}
49+
}
50+
51+
val ide: String by project
52+
val flutterPluginVersion: String by project
53+
val javaVersion: String by project
54+
val dartVersion: String by project
55+
val baseVersion: String by project
56+
val name: String by project
57+
val buildSpec: String by project
58+
59+
group = "io.flutter"
60+
version = flutterPluginVersion
61+
62+
java {
63+
sourceCompatibility = JavaVersion.toVersion(javaVersion)
64+
targetCompatibility = JavaVersion.toVersion(javaVersion)
65+
}
66+
67+
intellij {
68+
pluginName.set(name)
69+
// This adds nullability assertions, but also compiles forms.
70+
instrumentCode.set(true)
71+
updateSinceUntilBuild.set(false)
72+
localPath.set("${project.rootDir.absolutePath}/artifacts/$ide")
73+
downloadSources.set(false)
74+
val pluginList = mutableListOf(
75+
project(":flutter-idea"), "java", "Dart:$dartVersion", "properties",
76+
"junit", "Git4Idea", "Kotlin", "gradle", "org.jetbrains.android",
77+
"Groovy", "smali", "IntelliLang")
78+
if (ide == "android-studio") {
79+
pluginList += listOf(project(":flutter-studio"))
80+
} else if ("$buildSpec" == "2020.3") {
81+
pluginList += listOf("gradle-dsl-impl")
82+
}
83+
plugins.set(pluginList)
84+
}
85+
86+
tasks {
87+
buildSearchableOptions {
88+
enabled = false
89+
}
90+
}
91+
92+
dependencies {
93+
implementation(project("flutter-idea"))
94+
if (ide == "android-studio") {
95+
implementation(project("flutter-studio"))
96+
}
97+
}
98+
99+
tasks {
100+
instrumentCode {
101+
compilerVersion.set("$baseVersion")
102+
}
103+
instrumentTestCode {
104+
compilerVersion.set("$baseVersion")
105+
}
106+
}

flutter-idea/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
NEEDS TO BE UPDATED a/o 9 NOV 21
2+
13
# Gradle Module Structure
24

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

0 commit comments

Comments
 (0)