Skip to content

Commit

Permalink
+ shadowJar for :repl
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed May 28, 2020
1 parent d6a7825 commit d4b0754
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
22 changes: 13 additions & 9 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,27 @@ object Libs {

const val org_danilopianini_git_sensitive_semantic_versioning_gradle_plugin: String =
"org.danilopianini.git-sensitive-semantic-versioning:org.danilopianini.git-sensitive-semantic-versioning.gradle.plugin:" +
Versions.org_danilopianini_git_sensitive_semantic_versioning_gradle_plugin
Versions.org_danilopianini_git_sensitive_semantic_versioning_gradle_plugin

const val com_github_breadmoirai_github_release_gradle_plugin: String =
"com.github.breadmoirai.github-release:com.github.breadmoirai.github-release.gradle.plugin:" +
Versions.com_github_breadmoirai_github_release_gradle_plugin
"com.github.breadmoirai.github-release:com.github.breadmoirai.github-release.gradle.plugin:" +
Versions.com_github_breadmoirai_github_release_gradle_plugin

const val org_jetbrains_kotlin_multiplatform_gradle_plugin: String =
"org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin:" +
Versions.org_jetbrains_kotlin_multiplatform_gradle_plugin
"org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin:" +
Versions.org_jetbrains_kotlin_multiplatform_gradle_plugin

const val com_github_johnrengelman_shadow_gradle_plugin: String =
"com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" +
Versions.com_github_johnrengelman_shadow_gradle_plugin

const val de_fayard_buildsrcversions_gradle_plugin: String =
"de.fayard.buildSrcVersions:de.fayard.buildSrcVersions.gradle.plugin:" +
Versions.de_fayard_buildsrcversions_gradle_plugin
"de.fayard.buildSrcVersions:de.fayard.buildSrcVersions.gradle.plugin:" +
Versions.de_fayard_buildsrcversions_gradle_plugin

const val com_eden_orchidplugin_gradle_plugin: String =
"com.eden.orchidPlugin:com.eden.orchidPlugin.gradle.plugin:" +
Versions.com_eden_orchidplugin_gradle_plugin
"com.eden.orchidPlugin:com.eden.orchidPlugin.gradle.plugin:" +
Versions.com_eden_orchidplugin_gradle_plugin

const val org_jetbrains_dokka_gradle_plugin: String =
"org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:" +
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ object Versions {

const val org_jetbrains_kotlin_multiplatform_gradle_plugin: String = "1.3.72"

const val com_github_johnrengelman_shadow_gradle_plugin: String = "5.2.0"

const val de_fayard_buildsrcversions_gradle_plugin: String = "0.7.0"

const val com_eden_orchidplugin_gradle_plugin: String = "0.20.0"
Expand Down
22 changes: 22 additions & 0 deletions repl/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("com.github.johnrengelman.shadow") version Versions.com_github_johnrengelman_shadow_gradle_plugin
}

kotlin {

sourceSets {
Expand All @@ -11,3 +17,19 @@ kotlin {
}
}
}

val mainClass = "it.unibo.tuprolog.ui.repl.Main"

configurations.names.forEach { println(it) }

val shadowJar by tasks.creating(ShadowJar::class.java) {
dependsOn("jvmMainClasses")
archiveClassifier.set("redist")
configurations = listOf(
kotlin.jvm().compilations.getByName("main").compileDependencyFiles as Configuration
)
from(kotlin.jvm().compilations.getByName("main").output)
manifest {
attributes("Main-Class" to mainClass)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@file:JvmName("Repl")
@file:JvmName("Main")

package it.unibo.tuprolog.ui.repl

Expand Down

0 comments on commit d4b0754

Please sign in to comment.