1 /*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
<lambda>null17 plugins {
18 id("org.jetbrains.intellij") version "1.17.3"
19 java
20 id("com.diffplug.spotless") version "5.10.2"
21 }
22
23 val currentKtfmtVersion = rootProject.file("../version.txt").readText().trim()
24 val stableKtfmtVersion = rootProject.file("../stable_version.txt").readText().trim()
25 val pluginVersion = "1.1"
26
27 group = "com.facebook"
28
29 version = "$pluginVersion.$currentKtfmtVersion"
30
<lambda>null31 repositories {
32 mavenCentral()
33 mavenLocal()
34 }
35
<lambda>null36 java {
37 sourceCompatibility = JavaVersion.VERSION_11
38 targetCompatibility = JavaVersion.VERSION_11
39 }
40
<lambda>null41 dependencies {
42 implementation("com.facebook", "ktfmt", stableKtfmtVersion)
43 implementation("com.google.googlejavaformat", "google-java-format", "1.22.0")
44 }
45
46 // See https://github.com/JetBrains/gradle-intellij-plugin/
<lambda>null47 intellij {
48 // Version with which to build (and run; unless alternativeIdePath is specified)
49 version.set("2022.1")
50 // To run on a different IDE, uncomment and specify a path.
51 // localPath = "/Applications/Android Studio.app"
52 }
53
<lambda>null54 tasks {
55 patchPluginXml {
56 sinceBuild.set("221")
57 untilBuild.set("")
58 }
59 publishPlugin { token.set(System.getenv("JETBRAINS_MARKETPLACE_TOKEN")) }
60 runPluginVerifier { ideVersions.set(listOf("221")) }
61 }
62
<lambda>null63 spotless { java { googleJavaFormat("1.22.0") } }
64