mirror of
https://github.com/ethauvin/chip-8.git
synced 2025-04-26 01:07:14 -07:00
Trim down build file
This commit is contained in:
parent
e3a4f8d7b4
commit
f9a3c4a89a
1 changed files with 8 additions and 40 deletions
|
@ -2,17 +2,8 @@
|
||||||
|
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
|
|
||||||
buildscript {
|
fun DependencyHandler.impl(vararg dep: Any) = dep.forEach { implementation(it) }
|
||||||
repositories {
|
fun DependencyHandler.testImpl(vararg dep: Any) = dep.forEach { testImplementation(it) }
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
maven { setUrl("https://plugins.gradle.org/m2") }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
|
@ -29,31 +20,12 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
object This {
|
object This {
|
||||||
val version = "0.1"
|
|
||||||
val groupId = "com.beust"
|
|
||||||
val artifactId = "chip8"
|
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 {
|
dependencies {
|
||||||
listOf(kotlin("stdlib"), "com.beust:jcommander:1.72").forEach {
|
impl(kotlin("stdlib"), "com.beust:jcommander:1.72")
|
||||||
implementation(it)
|
testImpl(kotlin("test"), "org.testng:testng:7.0.0", "org.assertj:assertj-core:3.10.0")
|
||||||
}
|
|
||||||
|
|
||||||
listOf(kotlin("test"), "org.testng:testng:7.0.0", "org.assertj:assertj-core:3.10.0").forEach {
|
|
||||||
testImplementation(it)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val test by tasks.getting(Test::class) {
|
val test by tasks.getting(Test::class) {
|
||||||
|
@ -68,16 +40,12 @@ tasks {
|
||||||
named<ShadowJar>("shadowJar") {
|
named<ShadowJar>("shadowJar") {
|
||||||
archiveBaseName.set(This.artifactId)
|
archiveBaseName.set(This.artifactId)
|
||||||
mergeServiceFiles()
|
mergeServiceFiles()
|
||||||
// excludes = listOf("META-INF/*.DSA", "META-INF/*.RSA", "META-INF/*.SF")
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes(mapOf(
|
attributes(mapOf(
|
||||||
"Implementation-Title" to rootProject.name,
|
"Implementation-Title" to rootProject.name,
|
||||||
"Implementation-Version" to rootProject.version,
|
"Implementation-Version" to rootProject.version,
|
||||||
"Implementation-Vendor-Id" to rootProject.group,
|
"Implementation-Vendor-Id" to rootProject.group,
|
||||||
// attributes "Build-Time": ZonedDateTime.now(ZoneId.of("UTC"))
|
"Created-By" to "Gradle "+ gradle.gradleVersion,
|
||||||
// .format(DateTimeFormatter.ISO_ZONED_DATE_TIME)
|
|
||||||
// "Built-By" to java.net.InetAddress.localHost.hostName,
|
|
||||||
"Created-By" to "Gradle "+ gradle.gradleVersion,
|
|
||||||
"Main-Class" to "com.beust.cedlinks.MainKt"))
|
"Main-Class" to "com.beust.cedlinks.MainKt"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue