switch to Groovy DSL
This commit is contained in:
58
build.gradle
Normal file
58
build.gradle
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java-library'
|
||||||
|
id 'maven-publish'
|
||||||
|
id 'net.woggioni.gradle.lombok'
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "net.woggioni"
|
||||||
|
version = getProperty("jzstd.version")
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = 'https://woggioni.net/mvn/'
|
||||||
|
}
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lombok {
|
||||||
|
version = getProperty('lombok.version')
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation group: "net.java.dev.jna", name: "jna", version: getProperty("jna.version")
|
||||||
|
|
||||||
|
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-engine", version: getProperty("junit.version")
|
||||||
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: getProperty("junit.version")
|
||||||
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-params", version: getProperty("junit.version")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(Test) {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
|
||||||
|
wrapper {
|
||||||
|
distributionType = Wrapper.DistributionType.BIN
|
||||||
|
gradleVersion = getProperty('gradle.version')
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = 'https://mvn.woggioni.net/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@@ -1,44 +0,0 @@
|
|||||||
plugins {
|
|
||||||
`java-library`
|
|
||||||
`maven-publish`
|
|
||||||
}
|
|
||||||
|
|
||||||
group = "net.woggioni"
|
|
||||||
version = "0.1"
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun property(name : String) = project.property(name).toString()
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation("net.java.dev.jna", "jna", property("jna.version"))
|
|
||||||
|
|
||||||
compileOnly("org.projectlombok", "lombok", property("lombok.version"))
|
|
||||||
annotationProcessor("org.projectlombok", "lombok", property("lombok.version"))
|
|
||||||
|
|
||||||
testCompileOnly("org.projectlombok", "lombok", property("lombok.version"))
|
|
||||||
testAnnotationProcessor("org.projectlombok", "lombok", property("lombok.version"))
|
|
||||||
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", property("junit.version"))
|
|
||||||
testImplementation("org.junit.jupiter","junit-jupiter-api", property("junit.version"))
|
|
||||||
testImplementation("org.junit.jupiter","junit-jupiter-params", property("junit.version"))
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Test> {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
create<MavenPublication>("maven") {
|
|
||||||
from(components["java"])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
42
cli/build.gradle
Normal file
42
cli/build.gradle
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
plugins {
|
||||||
|
id "org.jetbrains.kotlin.jvm"
|
||||||
|
id "application"
|
||||||
|
}
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation group:"org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: getProperty("kotlin.version")
|
||||||
|
|
||||||
|
implementation group: "org.apache.logging.log4j", name: "log4j-slf4j-impl", version: property("log4j.version")
|
||||||
|
implementation group: "org.slf4j", name: "slf4j-api", version: property("slf4j.version")
|
||||||
|
implementation group: "com.beust", name: "jcommander", version: property("jcommander.version")
|
||||||
|
implementation rootProject
|
||||||
|
|
||||||
|
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-engine", version: property("junit.version")
|
||||||
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: property("junit.version")
|
||||||
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-params", version: property("junit.version")
|
||||||
|
}
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClassName = "net.woggioni.jzstd.Cli"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tasks.withType(Test) {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(KotlinCompile.class).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
languageVersion = "1.5"
|
||||||
|
apiVersion = "1.5"
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
javaParameters = true
|
||||||
|
}
|
||||||
|
}
|
@@ -1,48 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id("org.jetbrains.kotlin.jvm") version "1.4.10"
|
|
||||||
application
|
|
||||||
}
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
||||||
|
|
||||||
fun property(name : String) = project.property(name).toString()
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
// Align versions of all Kotlin components
|
|
||||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
|
|
||||||
|
|
||||||
// Use the Kotlin JDK 8 standard library.
|
|
||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
|
||||||
|
|
||||||
implementation("org.apache.logging.log4j", "log4j-slf4j-impl", property("log4j.version"))
|
|
||||||
implementation("org.slf4j", "slf4j-api", property("slf4j.version"))
|
|
||||||
implementation("com.beust", "jcommander", property("jcommander.version"))
|
|
||||||
implementation(project(":"))
|
|
||||||
|
|
||||||
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", property("junit.version"))
|
|
||||||
testImplementation("org.junit.jupiter","junit-jupiter-api", property("junit.version"))
|
|
||||||
testImplementation("org.junit.jupiter","junit-jupiter-params", property("junit.version"))
|
|
||||||
}
|
|
||||||
|
|
||||||
application {
|
|
||||||
mainClassName = "net.woggioni.jzstd.Cli"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<Test> {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
|
||||||
kotlinOptions {
|
|
||||||
languageVersion = "1.4"
|
|
||||||
apiVersion = "1.4"
|
|
||||||
jvmTarget = "1.8"
|
|
||||||
javaParameters = true // Useful for reflection.
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,8 +1,10 @@
|
|||||||
junit.version=5.6.2
|
jzstd.version = 0.1
|
||||||
lombok.version=1.18.16
|
gradle.version = 7.1
|
||||||
jna.version=5.5.0
|
kotlin.version = 1.5.20
|
||||||
kotlin.version=1.3.70
|
junit.version = 5.6.2
|
||||||
jcommander.version=1.78
|
lombok.version = 1.18.16
|
||||||
slf4j.version=1.7.30
|
jna.version = 5.5.0
|
||||||
log4j.version=2.13.2
|
jcommander.version = 1.78
|
||||||
net.woggioni.plugins.version=0.1
|
slf4j.version = 1.7.30
|
||||||
|
log4j.version = 2.13.2
|
||||||
|
net.woggioni.plugins.version = 0.1
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
17
settings.gradle
Normal file
17
settings.gradle
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = 'https://woggioni.net/mvn/'
|
||||||
|
}
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "net.woggioni.gradle.lombok" version "0.1"
|
||||||
|
id "org.jetbrains.kotlin.jvm" version getProperty("kotlin.version")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = "jzstd"
|
||||||
|
|
||||||
|
include("cli")
|
@@ -1,10 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
plugins {
|
|
||||||
`java-library` apply false
|
|
||||||
`maven-publish` apply false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = "jzstd"
|
|
||||||
|
|
||||||
include("cli")
|
|
Reference in New Issue
Block a user