Skip to content

Commit

Permalink
Version 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mayconsgs authored Jun 27, 2021
2 parents 426cffc + a729f60 commit 2536c78
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 77 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
name: Build
on: [push, pull_request]
jobs:

# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
gradleValidation:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2
Expand All @@ -37,7 +35,6 @@ jobs:
needs: gradleValidation
runs-on: ubuntu-latest
steps:

# Setup Java 1.8 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
Expand Down Expand Up @@ -82,7 +79,6 @@ jobs:
changelog: ${{ steps.properties.outputs.changelog }}
artifact: ${{ steps.properties.outputs.artifact }}
steps:

# Setup Java 1.8 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
Expand Down Expand Up @@ -144,7 +140,6 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:

# Setup Java 1.8 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
Expand Down Expand Up @@ -199,7 +194,6 @@ jobs:
needs: [build, verify]
runs-on: ubuntu-latest
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2
Expand Down
42 changes: 20 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,36 @@ on:
types: [prereleased, released]

jobs:

# Prepare and publish the plugin to the Marketplace repository
release:
name: Publish Plugin
runs-on: ubuntu-latest
steps:
# release:
# name: Publish Plugin
# runs-on: ubuntu-latest
# steps:

# Setup Java 1.8 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
# # Setup Java 1.8 environment for the next steps
# - name: Setup Java
# uses: actions/setup-java@v1
# with:
# java-version: 1.8

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name }}
# # Check out current repository
# - name: Fetch Sources
# uses: actions/checkout@v2
# with:
# ref: ${{ github.event.release.tag_name }}

# Publish the plugin to the Marketplace
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
run: ./gradlew publishPlugin
# # Publish the plugin to the Marketplace
# - name: Publish Plugin
# env:
# PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
# run: ./gradlew publishPlugin

# Patch changelog, commit and push to the current repository
changelog:
name: Update Changelog
needs: release
# needs: release
runs-on: ubuntu-latest
steps:

# Setup Java 1.8 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
Expand Down
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Initial version of plugin
- Update dependencies
55 changes: 12 additions & 43 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.changelog.closure
import org.jetbrains.changelog.date
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

fun properties(key: String) = project.findProperty(key).toString()

plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.5.0"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij") version "0.7.3"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
id("org.jetbrains.changelog") version "1.1.2"
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
id("io.gitlab.arturbosch.detekt") version "1.16.0"
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
}

group = properties("pluginGroup")
version = properties("pluginVersion")

// Configure project's dependencies
repositories {
mavenCentral()
jcenter()
Expand All @@ -33,33 +24,21 @@ dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0")
}

// Configure gradle-intellij-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName = properties("pluginName")
version = properties("platformVersion")
type = properties("platformType")
downloadSources = properties("platformDownloadSources").toBoolean()
updateSinceUntilBuild = true

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

// Configure gradle-changelog-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
version = properties("pluginVersion")
path = "${project.projectDir}/CHANGELOG.md"
header = closure { "[$version] - ${date()}" }
itemPrefix = "-"
keepUnreleasedSection = true
unreleasedTerm = "[Unreleased]"
groups = listOf("Added", "Changed", "Deprecated", "Removed", "Fixed", "Security")
groups = emptyList()
}

// Configure detekt plugin.
// Read more: https://detekt.github.io/detekt/kotlindsl.html
detekt {
config = files("./detekt-config.yml")
buildUponDefaultConfig = true
Expand All @@ -72,7 +51,6 @@ detekt {
}

tasks {
// Set the compatibility versions to 1.8
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
Expand All @@ -91,36 +69,27 @@ tasks {
untilBuild(properties("pluginUntilBuild"))

pluginDescription(
closure {
File("./README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
}
File("./README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
)

changeNotes(
closure {
changelog.getUnreleased().toHTML()
}
)
changeNotes(changelog.getUnreleased().toHTML())
}

runPluginVerifier {
ideVersions(properties("pluginVerifierIdeVersions"))
ideVersions(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty))
}

publishPlugin {
dependsOn("patchChangelog")
token(System.getenv("PUBLISH_TOKEN"))
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
pluginGroup=com.github.getomni.jetbrains
pluginName=Omni Theme
pluginVersion=0.1.2
pluginVersion=0.1.3
pluginSinceBuild=201.6668.113
pluginUntilBuild=211.*
pluginVerifierIdeVersions=201.8743.12, 202.8194.7, 203.7148.57
pluginUntilBuild=212.*
pluginVerifierIdeVersions=201.8743.12, 202.8194.7, 203.7148.57, 211.6693.111
platformType=IC
platformVersion=2020.2.4
platformDownloadSources=true
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/Omni.theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"lineSeparatorColor": "BGDarker"
},

"PopupMenuSeparator": {
"height": 1
},

"ToolBar": {
"background": "BGLighter"
},
Expand Down

0 comments on commit 2536c78

Please sign in to comment.