This repository was archived by the owner on Jun 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed
kotlin-power-assert-gradle
src/main/kotlin/com/bnorm/power Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 11# kotlin-power-assert
22
3- [ ![ Maven Central] ( https://maven-badges.herokuapp.com/maven-central/com.bnorm.power/kotlin-power-assert/badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/com.bnorm.power/kotlin-power-assert )
3+ [ ![ Maven Central] ( https://maven-badges.herokuapp.com/maven-central/com.bnorm.power/kotlin-power-assert-plugin /badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/com.bnorm.power/kotlin-power-assert-plugin )
44
55Kotlin Compiler Plugin which high-jacks Kotlin assert function calls and
66transforms them similar to [ Groovy's Power Assert feature] [ groovy-power-assert ] .
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
22 kotlin(" jvm" ) version " 1.4.0" apply false
33 id(" org.jetbrains.dokka" ) version " 0.10.0" apply false
44 id(" com.gradle.plugin-publish" ) version " 0.11.0" apply false
5+ id(" com.github.gmazzo.buildconfig" ) version " 2.0.2" apply false
56}
67
78allprojects {
Original file line number Diff line number Diff line change @@ -3,15 +3,23 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33plugins {
44 id(" java-gradle-plugin" )
55 kotlin(" jvm" )
6-
76 id(" com.gradle.plugin-publish" )
7+ id(" com.github.gmazzo.buildconfig" )
88}
99
1010dependencies {
1111 implementation(kotlin(" stdlib" ))
1212 implementation(kotlin(" gradle-plugin-api" ))
1313}
1414
15+ buildConfig {
16+ val project = project(" :kotlin-power-assert-plugin" )
17+ packageName(project.group.toString())
18+ buildConfigField(" String" , " PLUGIN_GROUP_ID" , " \" ${project.group} \" " )
19+ buildConfigField(" String" , " PLUGIN_ARTIFACT_ID" , " \" ${project.name} \" " )
20+ buildConfigField(" String" , " PLUGIN_VERSION" , " \" ${project.version} \" " )
21+ }
22+
1523pluginBundle {
1624 website = " https://github.com/bnorm/kotlin-power-assert"
1725 vcsUrl = " https://github.com/bnorm/kotlin-power-assert.git"
Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ class PowerAssertGradlePlugin : KotlinCompilerPluginSupportPlugin {
3333 override fun getCompilerPluginId (): String = " com.bnorm.kotlin-power-assert"
3434
3535 override fun getPluginArtifact (): SubpluginArtifact = SubpluginArtifact (
36- groupId = " com.bnorm.power " ,
37- artifactId = " kotlin-power-assert-plugin " ,
38- version = " 0.6.0-SNAPSHOT "
36+ groupId = BuildConfig . PLUGIN_GROUP_ID ,
37+ artifactId = BuildConfig . PLUGIN_ARTIFACT_ID ,
38+ version = BuildConfig . PLUGIN_VERSION
3939 )
4040
4141 override fun getPluginArtifactForNative (): SubpluginArtifact = SubpluginArtifact (
42- groupId = " com.bnorm.power " ,
43- artifactId = " kotlin-power-assert-plugin -native" ,
44- version = " 0.6.0-SNAPSHOT "
42+ groupId = BuildConfig . PLUGIN_GROUP_ID ,
43+ artifactId = BuildConfig . PLUGIN_ARTIFACT_ID + " -native" ,
44+ version = BuildConfig . PLUGIN_VERSION
4545 )
4646
4747 override fun applyToCompilation (
You can’t perform that action at this time.
0 commit comments