Skip to content

Commit

Permalink
bug fix base name &. scala version
Browse files Browse the repository at this point in the history
  • Loading branch information
geoHeil committed Jun 16, 2020
1 parent 5688bec commit 8c416c5
Showing 1 changed file with 57 additions and 3 deletions.
60 changes: 57 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import org.gradle.internal.impldep.org.joda.time.YearMonth.YEAR

plugins {
idea
// `maven-publish`
id("org.shipkit.java") version "2.3.1"
id("com.diffplug.gradle.spotless") version "4.3.0"
id("com.github.maiflai.scalatest") version "0.26" apply false
Expand All @@ -10,11 +11,48 @@ plugins {

allprojects {
group = "com.github.geoheil.streamingreference"
version = "0.1"

repositories {
jcenter()
}

// publishing {
// publications {
// create<MavenPublication>("mavenJava") {
// artifact shadowJar
// artifact sourceJar
// artifact scaladocJar
// pom {
// name.set("My Library")
// description.set("A concise description of my library")
// url.set("http://www.example.com/library")
// properties.set(mapOf(
// "myProp" to "value",
// "prop.with.dots" to "anotherValue"
// ))
// licenses {
// license {
// name.set("The Apache License, Version 2.0")
// url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
// }
// }
// developers {
// developer {
// id.set("johnd")
// name.set("John Doe")
// email.set("[email protected]")
// }
// }
// scm {
// connection.set("scm:git:git://example.com/my-library.git")
// developerConnection.set("scm:git:ssh://example.com/my-library.git")
// url.set("http://example.com/my-library/")
// }
// }
// }
// }
// }


}

configure(subprojects/*.filter { it.name == "greeter" || it.name == "greeting-library" }*/) {
Expand All @@ -25,6 +63,9 @@ configure(subprojects/*.filter { it.name == "greeter" || it.name == "greeting-li
apply(plugin = "com.diffplug.gradle.spotless")
apply(plugin = "com.github.johnrengelman.shadow")

// TODO cross build for multiple scala/flink/spark versions
base.archivesBaseName = "${project.name}_${Libraries.ScalaVersions.scalaVBase}"

dependencies {
// Use Scala 2.13 in our library project
val implementation by configurations
Expand All @@ -51,20 +92,33 @@ configure(subprojects/*.filter { it.name == "greeter" || it.name == "greeting-li
}
}

// java {
// jar{
// project.arch archivesBaseName = "asdf"
// }
// }
//archivesBaseName.set("${project.name}_${Libraries.ScalaVersions.scalaVBase}")
val shadowJar: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar by tasks
shadowJar.apply {
mergeServiceFiles()
// manifest.attributes.apply {
// put("Main-Class", serverClassName)
// }
// archiveBaseName.set("shadow")
archiveBaseName.set("${project.name}_${Libraries.ScalaVersions.scalaVBase}-all")
// baseName = project.name + "-fat"
}
tasks {
build {
dependsOn(shadowJar)
}
}

// tasks.withType(ScalaCompile) {
// configure(scalaCompileOptions.forkOptions) {
// memoryMaximumSize = '1g'
// jvmArgs = ['-XX:MaxPermSize=512m']
// }
// }
//
// dependencies {
// "testCompile"("org.spockframework:spock-core:1.0-groovy-2.4") {
Expand Down

0 comments on commit 8c416c5

Please sign in to comment.