Skip to content

Commit

Permalink
Merge branch 'release/1.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimaeon committed Dec 12, 2022
2 parents 9ac7e9e + 2cc5a70 commit 04b3219
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 56 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ jobs:
create-github-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Create Release Notes
run: ./gradlew --quiet getChangelog --no-header > ./RELEASE_NOTES.md
- name: Create Release
id: create_release
uses: chrimaeon/github-create-release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
body_file: ./RELEASE_NOTES.md
publish: true
- name: Notify Slack
uses: chrimaeon/github-slack-action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: zulu

- name: Gradle Cache
Expand Down
29 changes: 15 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [Unreleased]
## Unreleased

### Added

### Changed
Expand All @@ -13,35 +14,35 @@

### Security

## [1.5.0]
### Added
## 1.6.0

### Changed
- Update Retrace to version 7.2.1
- Update Retrace to version 7.3.0

### Deprecated
## 1.5.0

### Removed

### Fixed
### Changed
- Update Retrace to version 7.2.1

### Security
## 1.4.0

## [1.4.0]
### Changed
- Update Retrace to version 7.1.1

## [1.3.0]
## 1.3.0

### Added
- Settings for verbose output and de-obfuscate all class names

## [1.2.0]
## 1.2.0

### Added
- Plugin Icon

### Changed
- Use _guardsquare_ gradle coordinates

## [1.1.0]
## 1.1.0

### Added
- Show dialog if mapping file cannot be found
- Show dialog if mapping file cannot be found
79 changes: 56 additions & 23 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,29 @@
*/

import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
import kotlinx.kover.api.VerificationValueType.COVERED_LINES_PERCENTAGE
import kotlinx.kover.api.CounterType
import kotlinx.kover.api.VerificationValueType
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.changelog.Changelog
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.Date

plugins {
java
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.intellij)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.changelog)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.kotlin.jvm)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.depUpdates)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.kover)
}

group = "com.cmgapps.intellij"
version = "1.5.0"
version = "1.6.0"

repositories {
mavenCentral()
Expand All @@ -39,7 +46,7 @@ repositories {
val ktlint: Configuration by configurations.creating

intellij {
version.set("2022.1")
version.set("2022.3")
updateSinceUntilBuild.set(false)
plugins.add("java")
}
Expand All @@ -49,6 +56,37 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}

kover {
filters {
classes {
excludes += listOf("com.cmgapps.intellij.ErrorDialog")
}
}
htmlReport {
onCheck.set(true)
}
verify {
onCheck.set(true)

rule {
name = "Minimal line coverage rate in percent"
bound {
minValue = 80
counter = CounterType.LINE
valueType = VerificationValueType.COVERED_PERCENTAGE
}
}
}
}

changelog {
header.set(
provider {
version.get()
}
)
}

tasks {
wrapper {
distributionType = Wrapper.DistributionType.ALL
Expand All @@ -64,7 +102,7 @@ tasks {
test {
useJUnitPlatform()
testLogging {
events = setOf(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED)
events(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED)
}
}

Expand Down Expand Up @@ -113,31 +151,20 @@ tasks {
}
}

koverMergedHtmlReport {
excludes = listOf("com.cmgapps.intellij.ErrorDialog")
}

koverMergedVerify {
excludes = listOf("com.cmgapps.intellij.ErrorDialog")

rule {
name = "Minimal line coverage rate in percent"
bound {
minValue = 80
valueType = COVERED_LINES_PERCENTAGE
}
}
}

// region IntelliJ Plugin
patchPluginXml {
changeNotes.set(
provider {
if (changelog.has(project.version as String)) {
val item = if (changelog.has(project.version as String)) {
changelog.get(project.version as String)
} else {
changelog.getUnreleased()
}.toHTML()
}
changelog.renderItem(
item.withHeader(false)
.withEmptySections(false),
Changelog.OutputType.HTML
)
}
)
}
Expand All @@ -155,9 +182,13 @@ tasks {
"IC-2019.1.4",
"IC-2020.1.4",
"IC-2021.1.3",
"IC-2022.1.1",
"IC-2022.3"
)
}

buildSearchableOptions {
enabled = false
}
// endregion
}

Expand All @@ -170,6 +201,8 @@ dependencies {

testImplementation(platform(libs.junit.bom))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation(libs.hamcrest)
testImplementation(libs.bundles.mockito)
}
22 changes: 11 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[versions]
kotlin = "1.6.21"
mockito = "4.5.1"
gradle = "7.4.1"
kotlin = "1.7.22"
mockito = "4.9.0"
gradle = "7.6"

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin"}
intellij = "org.jetbrains.intellij:1.5.3"
changelog = "org.jetbrains.changelog:1.3.1"
depUpdates = "com.github.ben-manes.versions:0.42.0"
kover = "org.jetbrains.kotlinx.kover:0.5.1"
intellij = "org.jetbrains.intellij:1.10.1"
changelog = "org.jetbrains.changelog:2.0.0"
depUpdates = "com.github.ben-manes.versions:0.44.0"
kover = "org.jetbrains.kotlinx.kover:0.6.1"

[libraries]
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin"}
proguard-retrace = "com.guardsquare:proguard-retrace:7.2.1"
okio = "com.squareup.okio:okio:3.1.0"
ktlint = "com.pinterest:ktlint:0.45.2"
junit-bom = "org.junit:junit-bom:5.8.2"
proguard-retrace = "com.guardsquare:proguard-retrace:7.3.0"
okio = "com.squareup.okio:okio:3.2.0"
ktlint = "com.pinterest:ktlint:0.47.1"
junit-bom = "org.junit:junit-bom:5.9.1"
hamcrest = "org.hamcrest:hamcrest-library:2.2"
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockito-junit = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import java.awt.event.ItemEvent
import java.io.File
import java.io.LineNumberReader
import java.io.PrintWriter
import java.io.StringReader
import java.util.ResourceBundle
import javax.swing.Action
import javax.swing.BoxLayout
Expand Down Expand Up @@ -59,7 +58,7 @@ class ProguardRetraceUnscrambler : UnscrambleSupport<JPanel> {
(settings?.getComponent(ALL_CLASS_NAMES_INDEX) as? JCheckBox)?.isSelected ?: false
val verboseSetting: Boolean = (settings?.getComponent(VERBOSE_INDEX) as? JCheckBox)?.isSelected ?: false

return LineNumberReader(StringReader(text)).use { reader ->
return LineNumberReader(text.reader().buffered()).use { reader ->
val buffer = Buffer()
PrintWriter(buffer.outputStream()).use { writer ->
ReTrace(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class ProguardRetraceUnscramblerShould : BasePlatformTestCase() {
@Test
fun `de-obfuscate allClassNames stacktrace`() {
settings.apply {

add(
JCheckBox().also {
it.isSelected = true
Expand All @@ -109,7 +108,6 @@ class ProguardRetraceUnscramblerShould : BasePlatformTestCase() {
@Test
fun `de-obfuscate verbose stacktrace`() {
settings.apply {

add(
JCheckBox().also {
it.isSelected = false
Expand All @@ -133,7 +131,6 @@ class ProguardRetraceUnscramblerShould : BasePlatformTestCase() {
@Test
fun `de-obfuscate allClassNames and verbose stacktrace`() {
settings.apply {

add(
JCheckBox().also {
it.isSelected = true
Expand Down

0 comments on commit 04b3219

Please # to comment.