Skip to content

Commit

Permalink
Implement plugin features based version based on @klazuka's intellij-…
Browse files Browse the repository at this point in the history
…elm and @google's google-java-format plugins.
  • Loading branch information
kuglee committed Mar 21, 2022
1 parent 9c1ad30 commit 8b082cd
Show file tree
Hide file tree
Showing 29 changed files with 1,035 additions and 157 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!-- Keep a Changelog guide -> https://keepachangelog.com -->

# intellj-plugin-test Changelog
# intellij-swift-format Changelog

## [Unreleased]

### Added
- Initial scaffold created from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)

- Initial version based on Keith Lazuka's [intellij-elm](https://github.com/klazuka/intellij-elm) and Google
Inc.'s [google-java-format](https://github.com/google/google-java-format) plugins.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Gábor Librecz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 14 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
# intellj-plugin-test

![Build](https://github.com/kuglee/intellj-plugin-test/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/PLUGIN_ID.svg)](https://plugins.jetbrains.com/plugin/PLUGIN_ID)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/PLUGIN_ID.svg)](https://plugins.jetbrains.com/plugin/PLUGIN_ID)

## Template ToDo list
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
- [ ] Get familiar with the [template documentation][template].
- [ ] Verify the [pluginGroup](/gradle.properties), [plugin ID](/src/main/resources/META-INF/plugin.xml) and [sources package](/src/main/kotlin).
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html).
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
- [ ] Set the Plugin ID in the above README badges.
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html).
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
# intellij-swift-format

![Build](https://github.com/kuglee/intellij-swift-format/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/org.swiftformat.plugin.svg)](https://plugins.jetbrains.com/plugin/org.swiftformat.plugin)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/org.swiftformat.plugin.svg)](https://plugins.jetbrains.com/plugin/org.swiftformat.plugin)

<!-- Plugin description -->
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.

This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.
<!-- Plugin description -->
Enables formatting of Swift source code using swift-format

To keep everything working, do not remove `<!-- ... -->` sections.
Licensing see: https://github.com/kuglee/intellij-swift-format/blob/master/LICENSE.txt
and https://github.com/kuglee/intellij-swift-format/tree/master/license
<!-- Plugin description end -->

## Installation

- Using IDE built-in plugin system:
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "intellj-plugin-test"</kbd> >

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "swift-format"</kbd> >
<kbd>Install Plugin</kbd>

- Manually:

Download the [latest release](https://github.com/kuglee/intellj-plugin-test/releases/latest) and install it manually using
Download the [latest release](https://github.com/kuglee/intellij-swift-format/releases/latest) and install it manually
using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>


---
Plugin based on the [IntelliJ Platform Plugin Template][template].

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ intellij {

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
// localPath.set(properties("localPath"))
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
Expand Down
29 changes: 11 additions & 18 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
# IntelliJ Platform Artifacts Repositories
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = com.github.kuglee.intelljplugintest
pluginName = intellj-plugin-test
pluginGroup=org.swiftformat.plugin
pluginName=swift-format
# SemVer format -> https://semver.org
pluginVersion = 0.0.1

pluginVersion=1.0.0-beta1
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 211
pluginUntilBuild = 213.*

pluginSinceBuild=213
pluginUntilBuild=213.*
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 2021.1.3

platformType=IC
platformVersion=2021.3
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins =

platformPlugins=
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion = 11

javaVersion=11
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 7.4

gradleVersion=7.4
# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency = false
kotlin.stdlib.default.dependency=false
12 changes: 12 additions & 0 deletions license/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The MIT license (given in full in LICENSE.txt) applies to all code in this repository which is copyright by Gábor
Librecz. The following sections of the repository contain third-party code, to which different licenses may apply:

- Path `src/main/kotlin/org/swiftformat/plugin/utils`
- License: MIT (license/third_party/intellij-elm_LICENSE.txt)
- Origin: intellij-elm, Copyright 2017, Keith
Lazuka [https://github.com/klazuka/intellij-elm](https://github.com/klazuka/intellij-elm)

- Path `src/main/kotlin/org/swiftformat/plugin`
- License: Apache License 2.0 (license/third_party/google-java-format_LICENSE.txt)
- Origin: google-java-format, Copyright 2015 Google
Inc. [https://github.com/google/google-java-format](https://github.com/google/google-java-format)
13 changes: 13 additions & 0 deletions license/third_party/google-java-format_LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2015 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
21 changes: 21 additions & 0 deletions license/third_party/intellij-elm_LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Keith Lazuka

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = "intellj-plugin-test"
rootProject.name = "intellij-swift-format"
21 changes: 0 additions & 21 deletions src/main/kotlin/com/github/kuglee/intelljplugintest/MyBundle.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8b082cd

Please sign in to comment.