102 lines
2.9 KiB
Groovy
102 lines
2.9 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'jacoco'
|
|
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
|
|
}
|
|
|
|
/*
|
|
* The MIT License (MIT)
|
|
*
|
|
* Copyright (c) 2025 Ziver Koc
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
* THE SOFTWARE.
|
|
*/
|
|
|
|
// Load custom properties
|
|
if (project.hasProperty('customProperties')) {
|
|
project.logger.info("Loading custom properties from: ${project.property('customProperties')}")
|
|
def props = new Properties()
|
|
file(project.property('customProperties')).withInputStream { props.load(it) }
|
|
|
|
props.each {key, value ->
|
|
project.logger.info("Updating property: ${key}")
|
|
project.ext[key] = value
|
|
}
|
|
}
|
|
|
|
apply from: 'build_publish.gradle'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.dom4j:dom4j:2.1.3'
|
|
|
|
implementation 'org.xerial:sqlite-jdbc:3.42.0.1'
|
|
compileOnly 'mysql:mysql-connector-java:8.0.28'
|
|
|
|
compileOnly 'javax.servlet:javax.servlet-api:3.1.0'
|
|
|
|
compileOnly 'org.shredzone.acme4j:acme4j-client:2.12'
|
|
compileOnly 'org.shredzone.acme4j:acme4j-utils:2.12'
|
|
|
|
compileOnly 'commons-fileupload:commons-fileupload:1.4'
|
|
compileOnly 'commons-io:commons-io:2.14.0'
|
|
|
|
testImplementation 'junit:junit:4.13.1'
|
|
testImplementation 'org.hamcrest:hamcrest-core:1.3'
|
|
testImplementation 'com.carrotsearch:junit-benchmarks:0.7.2'
|
|
}
|
|
|
|
group = 'se.koc'
|
|
version = project.hasProperty('releaseVersion') ? releaseVersion : '1.0.0-SNAPSHOT'
|
|
sourceCompatibility = 11
|
|
targetCompatibility = 11
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDirs 'src'
|
|
}
|
|
resources {
|
|
srcDir 'src'
|
|
exclude '**/*.java'
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDirs 'test'
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named('sourcesJar') {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|