1
0
Fork 0
mirror of https://github.com/ethauvin/chip-8.git synced 2025-04-26 09:17:12 -07:00

Trim down build file

This commit is contained in:
Cedric Beust 2020-08-23 14:43:24 -07:00 committed by Erik C. Thauvin
parent e3a4f8d7b4
commit f9a3c4a89a

View file

@ -2,17 +2,8 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
buildscript {
repositories {
jcenter()
mavenCentral()
maven { setUrl("https://plugins.gradle.org/m2") }
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
}
}
fun DependencyHandler.impl(vararg dep: Any) = dep.forEach { implementation(it) }
fun DependencyHandler.testImpl(vararg dep: Any) = dep.forEach { testImplementation(it) }
plugins {
java
@ -29,31 +20,12 @@ repositories {
}
object This {
val version = "0.1"
val groupId = "com.beust"
val artifactId = "chip8"
val description = "A CHIP8 emulator"
val url = "https://github.com/cbeust/chip8"
val scm = "github.com/cbeust/chip8.git"
// Should not need to change anything below
val issueManagementUrl = "https://$scm/issues"
val isSnapshot = version.contains("SNAPSHOT")
}
allprojects {
group = This.groupId
version = This.version
}
dependencies {
listOf(kotlin("stdlib"), "com.beust:jcommander:1.72").forEach {
implementation(it)
}
listOf(kotlin("test"), "org.testng:testng:7.0.0", "org.assertj:assertj-core:3.10.0").forEach {
testImplementation(it)
}
impl(kotlin("stdlib"), "com.beust:jcommander:1.72")
testImpl(kotlin("test"), "org.testng:testng:7.0.0", "org.assertj:assertj-core:3.10.0")
}
val test by tasks.getting(Test::class) {
@ -68,16 +40,12 @@ tasks {
named<ShadowJar>("shadowJar") {
archiveBaseName.set(This.artifactId)
mergeServiceFiles()
// excludes = listOf("META-INF/*.DSA", "META-INF/*.RSA", "META-INF/*.SF")
manifest {
attributes(mapOf(
"Implementation-Title" to rootProject.name,
"Implementation-Version" to rootProject.version,
"Implementation-Vendor-Id" to rootProject.group,
// attributes "Build-Time": ZonedDateTime.now(ZoneId.of("UTC"))
// .format(DateTimeFormatter.ISO_ZONED_DATE_TIME)
// "Built-By" to java.net.InetAddress.localHost.hostName,
"Created-By" to "Gradle "+ gradle.gradleVersion,
"Implementation-Title" to rootProject.name,
"Implementation-Version" to rootProject.version,
"Implementation-Vendor-Id" to rootProject.group,
"Created-By" to "Gradle "+ gradle.gradleVersion,
"Main-Class" to "com.beust.cedlinks.MainKt"))
}
}