| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- plugins {
- id 'java'
- id 'maven-publish'
- }
- group = 'com.its'
- version = '0.0.1'
- sourceCompatibility = '1.8'
- targetCompatibility = '1.8'
- repositories {
- mavenCentral()
- }
- dependencies {
- implementation 'io.netty:netty-all:4.1.52.Final'
- }
- //processResources {
- // enabled = false
- //}
- //jar {
- // enabled = true
- //}
- test {
- useJUnitPlatform()
- }
- publishing {
- publications {
- mavenJava(MavenPublication) {
- from components.java
- }
- }
- repositories {
- maven {
- name = "customLocalRepo"
- println "its-cluster library install mvn repository..."
- def repoPath = org.gradle.internal.os.OperatingSystem.current().isWindows() ?
- "C:/java/repository" :
- "/Users/openvalue/Projects/java/repository"
- url = uri(repoPath)
- }
- /*
- * 참고: 더 표준적인 방법은 모든 프로젝트가 공유하는 기본 로컬 Maven 저장소(~/.m2/repository)를 사용하는 것입니다.
- * 그렇게 하려면 위 'maven' 블록 대신 아래 'mavenLocal()'을 사용하면 됩니다.
- * mavenLocal()
- */
- }
- }
- tasks.register('runInstallJarLibrary', Exec) {
- doFirst {
- println "its-cluster library install mvn repository..."
- def os = org.gradle.internal.os.OperatingSystem.current()
- workingDir = file('.')
- if (os.isWindows()) {
- commandLine 'cmd', '/C', 'start', 'install.bat'
- } else {
- commandLine 'sh', './install.sh'
- }
- }
- }
- jar.finalizedBy runInstallJarLibrary
- tasks.withType(JavaCompile).configureEach {
- options.encoding = 'UTF-8'
- options.compilerArgs << '-Xlint:unchecked'
- options.deprecation = true
- }
|