Skip to content

Commit

Permalink
removed everything and use the default configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls committed Nov 10, 2023
1 parent ae7d316 commit 5da9264
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 3 deletions.
2 changes: 2 additions & 0 deletions diktat-cli/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.saveourtool.diktat.buildutils.configurePublications
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.incremental.createDirectory
Expand Down Expand Up @@ -92,3 +93,4 @@ publishing {
}
}
}
configurePublications()
43 changes: 42 additions & 1 deletion diktat-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import com.saveourtool.diktat.buildutils.configurePom
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
//import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration")
id("com.saveourtool.diktat.buildutils.code-quality-convention")
id("com.saveourtool.diktat.buildutils.publishing-default-configuration")
id("com.saveourtool.diktat.buildutils.publishing-configuration")
id("pl.droidsonroids.jacoco.testkit") version "1.0.12"
id("org.gradle.test-retry") version "1.5.6"
id("com.gradle.plugin-publish") version "1.2.1"
// alias(libs.plugins.shadow)
}

dependencies {
Expand Down Expand Up @@ -48,6 +51,38 @@ gradlePlugin {
}
}

//tasks.named("jar") {
// enabled = false
//}
//val shadowJar by tasks.existing(ShadowJar::class) {
// archiveClassifier.set("")
// duplicatesStrategy = DuplicatesStrategy.FAIL
//}
//
//val javadocJar by tasks.registering(Jar::class) {
// group = "documentation"
// archiveClassifier.set("javadoc")
// from(tasks.named("dokkaHtml"))
//}
//
//publishing {
// repositories {
// mavenLocal()
// }
// publications {
// val pluginMaven by creating(MavenPublication::class) {
// artifact(shadowJar)
// artifact(javadocJar)
// pom {
// configurePom(project)
// }
// }
// }
//}




// === testing & code coverage, jacoco is run independent from maven
val functionalTestTask by tasks.register<Test>("functionalTest")
tasks.withType<Test> {
Expand Down Expand Up @@ -105,3 +140,9 @@ tasks.jacocoTestReport {
xml.required.set(true)
}
}

//afterEvaluate {
// tasks.named("publishDiktatPluginPluginMarkerMavenPublicationToMavenLocal") {
// dependsOn(javadocJar)
// }
//}
2 changes: 2 additions & 0 deletions diktat-maven-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.saveourtool.diktat.buildutils.configurePublications
import de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask
import de.benediktritter.maven.plugin.development.task.GenerateMavenPluginDescriptorTask

Expand Down Expand Up @@ -47,3 +48,4 @@ publishing {
}
}
}
configurePublications()
2 changes: 2 additions & 0 deletions diktat-ruleset/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.saveourtool.diktat.buildutils.configurePom
import com.saveourtool.diktat.buildutils.configurePublications
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

Expand Down Expand Up @@ -73,3 +74,4 @@ publishing {
}
}
}
configurePublications()
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import org.jetbrains.dokka.gradle.DokkaPlugin
* Configures all aspects of the publishing process.
*/
fun Project.configurePublishing() {
configurePublications()
apply<MavenPublishPlugin>()
if (this == rootProject) {
configureNexusPublishing()
Expand Down Expand Up @@ -161,7 +160,7 @@ private fun Project.configureGitHubPublishing() {
* Configures all publications. The publications must already exist.
*/
@Suppress("TOO_LONG_FUNCTION")
private fun Project.configurePublications() {
fun Project.configurePublications() {
if (this == rootProject) {
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ publishing {
}
}

configurePublications()
configurePublishing()

0 comments on commit 5da9264

Please sign in to comment.