Initial commit

This commit is contained in:
Elex
2021-08-22 16:55:56 +09:00
commit eedf066993
16 changed files with 536 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
plugins{
`kotlin-dsl`
}
repositories {
gradlePluginPortal()
}

View File

@@ -0,0 +1,17 @@
plugins {
id("elex-base")
application
}
tasks.jar {
manifest {
attributes(mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to "ELEX co.,pte.",
"Main-Class" to application.mainClass,
"Automatic-Module-Name" to "com.elex_project.${project.name}"
))
}
}

View File

@@ -0,0 +1,66 @@
plugins {
java
}
group = "com.elex-project"
version = "1.0-SNAPSHOT"
description = ""//todo
repositories {
maven {
url = uri("https://repository.elex-project.com/repository/maven")
}
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = org.gradle.api.JavaVersion.VERSION_1_8
targetCompatibility = org.gradle.api.JavaVersion.VERSION_1_8
}
configurations {
compileOnly {
extendsFrom(annotationProcessor.get())
}
testCompileOnly {
extendsFrom(testAnnotationProcessor.get())
}
}
tasks.compileJava {
options.encoding = "UTF-8"
}
tasks.compileTestJava {
options.encoding = "UTF-8"
}
tasks.test {
useJUnitPlatform()
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
(options as StandardJavadocDocletOptions).encoding = "UTF-8"
(options as StandardJavadocDocletOptions).charSet = "UTF-8"
(options as StandardJavadocDocletOptions).docEncoding = "UTF-8"
}
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.jetbrains:annotations:21.0.1")
compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20")
testAnnotationProcessor("org.projectlombok:lombok:1.18.20")
testImplementation("ch.qos.logback:logback-classic:1.2.3")
testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
}

View File

@@ -0,0 +1,99 @@
import gradle.kotlin.dsl.accessors._496219b122f87f8abbd64d1094d3f5b6.jar
plugins {
id ("elex-base")
`java-library`
`maven-publish`
}
tasks.jar {
manifest { // todo
attributes(mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to "ELEX co.,pte.",
"Automatic-Module-Name" to "com.elex_project.${project.name}"
))
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
// todo
name.set("${rootProject.name} ${project.name}")
description.set(project.description)
url.set("https://www.elex-project.com/")
inceptionYear.set("2021")
properties.set(mapOf(
"myProp" to "value",
"prop.with.dots" to "anotherValue"
))
organization {
name.set("Elex co.,Pte.")
url.set("https://www.elex-project.com/")
}
licenses {
license {
// todo
name.set("Apache License 2.0")
url.set("https://github.com/elex-project/${rootProject.name}/blob/main/LICENSE")
comments.set("")
}
}
developers {
developer {
id.set("elex")
name.set("Elex")
url.set("https://www.elex.pe.kr/")
email.set("developer@elex-project.com")
organization.set("Elex Co.,Pte.")
organizationUrl.set("https://www.elex-project.com/")
roles.set(arrayListOf("Developer", "CEO"))
timezone.set("Asia/Seoul")
properties.set(mapOf("" to ""))
}
}
contributors {
contributor {
name.set("")
email.set("")
url.set("")
}
}
scm {
// todo
connection.set("scm:git:https://github.com/elex-project/${rootProject.name}.git")
developerConnection.set("scm:git:https://github.com/elex-project/${rootProject.name}.git")
url.set("https://github.com/elex-project/${rootProject.name}/")
}
}
}
}
repositories {
maven {
name = "mavenElex"
val urlRelease = uri("https://repository.elex-project.com/repository/maven-releases")
val urlSnapshot = uri("https://repository.elex-project.com/repository/maven-snapshots")
url = if (version.toString().endsWith("SNAPSHOT")) urlSnapshot else urlRelease
// Repository credential, Must be defined in ~/.gradle/gradle.properties
credentials {
username = project.findProperty("repo.username") as String
password = project.findProperty("repo.password") as String
}
}
maven { //todo
name = "mavenGithub"
url = uri("https://maven.pkg.github.com/elex-project/${rootProject.name}")
credentials {
username = project.findProperty("github.username") as String
password = project.findProperty("github.token") as String
}
}
}
}
dependencies {
}