• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "0.7.2"
19   java
20   id("com.diffplug.spotless") version "5.10.2"
21 }
22 
23 val ktfmtVersion = rootProject.file("../version.txt").readText().trim()
24 val pluginVersion = "1.1"
25 
26 group = "com.facebook"
27 
28 version = "$pluginVersion.$ktfmtVersion"
29 
<lambda>null30 repositories {
31   mavenCentral()
32   mavenLocal()
33 }
34 
<lambda>null35 java {
36   sourceCompatibility = JavaVersion.VERSION_11
37   targetCompatibility = JavaVersion.VERSION_11
38 }
39 
<lambda>null40 dependencies {
41   implementation("com.facebook", "ktfmt", ktfmtVersion)
42   implementation("com.google.googlejavaformat", "google-java-format", "1.8")
43 }
44 
45 // See https://github.com/JetBrains/gradle-intellij-plugin/
<lambda>null46 intellij {
47   // Version with which to build (and run; unless alternativeIdePath is specified)
48   version = "2020.3"
49   // To run on a different IDE, uncomment and specify a path.
50   // alternativeIdePath = "/Applications/Android Studio.app"
51 }
52 
<lambda>null53 tasks {
54   patchPluginXml {
55     sinceBuild("201")
56     untilBuild("")
57   }
58   publishPlugin { token(System.getenv("JETBRAINS_MARKETPLACE_TOKEN")) }
59   runPluginVerifier { ideVersions(listOf("211.6432.7")) }
60 }
61 
<lambda>null62 spotless { java { googleJavaFormat() } }
63