mirror of
https://github.com/Prominence/openweathermap-java-api.git
synced 2026-01-09 19:46:41 +03:00
* New mapping approach - Refreshes license information in file headers - Rewrites API models to eliminate most of the custom mapping code - Redefines API configuration options - Simplifies fetching and mapping logic - Updates dependency versions - Reduces Java source level to 8 everywhere to eliminate JavaDoc warnings related to generated code - Moves some in-line JSONs to class path resources to make tests more clean - Adds assumptions to skip integration tests if API key is not set - Adds assumptions to skip One Call API tests unless RUN_ONE_CALL env var is set - Solves issue around UnsupportedOperationExceptions in certain terminators - Adds option to use secure channel for picture URLs - Adds new tests Signed-off-by: Esta Nagy <nagyesta@gmail.com> * New mapping approach - Code review - Minor fixes - Adds new tests Signed-off-by: Esta Nagy <nagyesta@gmail.com> * New mapping approach - Code review - Add more tests Signed-off-by: Esta Nagy <nagyesta@gmail.com> * New mapping approach - Code review - Unified coordinate and time period usage - Fixed local system dependent test Signed-off-by: Esta Nagy <nagyesta@gmail.com> * New mapping approach - Code review - Fixed line separator issue in response processing - Changed how unitSystem can be defined by moving this parameter to the JSON/XML/HTML terminator methods Signed-off-by: Esta Nagy <nagyesta@gmail.com> Signed-off-by: Esta Nagy <nagyesta@gmail.com>
119 lines
3.3 KiB
Groovy
119 lines
3.3 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
id 'jacoco'
|
|
id 'io.freefair.lombok' version '6.5.0.3'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
|
|
implementation 'org.slf4j:slf4j-api:1.7.36'
|
|
|
|
testImplementation 'org.junit.platform:junit-platform-runner:1.9.0'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.0'
|
|
testImplementation 'ch.qos.logback:logback-classic:1.2.11'
|
|
testImplementation 'commons-io:commons-io:2.11.0'
|
|
testImplementation 'org.mockito:mockito-core:4.8.0'
|
|
}
|
|
|
|
group = 'com.github.prominence'
|
|
version = '3.0.0-SNAPSHOT'
|
|
description = 'Java OpenWeatherMap API'
|
|
|
|
configure([tasks.compileJava]) {
|
|
sourceCompatibility = 8
|
|
}
|
|
|
|
ext {
|
|
isReleaseVersion = !version.endsWith("SNAPSHOT")
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
|
|
pom {
|
|
name = 'Java OpenWeatherMap API'
|
|
description = 'Java API for OpenWeatherMap services.'
|
|
url = 'https://github.com/Prominence/openweathermap-java-api'
|
|
|
|
licenses {
|
|
license {
|
|
name = 'MIT License'
|
|
url = 'https://www.opensource.org/licenses/mit-license.php'
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = 'Prominence'
|
|
name = 'Alexey Zinchenko'
|
|
email = 'alexey.zinchenko@protonmail.com'
|
|
url = 'https://github.com/prominence'
|
|
}
|
|
}
|
|
scm {
|
|
connection = 'scm:git:git://github.com/Prominence/openweathermap-java-api.git'
|
|
developerConnection = 'scm:git:git@github.com:prominence/openweathermap-java-api.git'
|
|
url = 'https://github.com/Prominence/openweathermap-java-api'
|
|
}
|
|
issueManagement {
|
|
url = 'https://github.com/Prominence/openweathermap-java-api/issues'
|
|
system = 'GitHub Issues'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
credentials {
|
|
username = project.findProperty('ossrhUsername')
|
|
password = project.findProperty('ossrhPassword')
|
|
}
|
|
|
|
url = isReleaseVersion ?
|
|
'https://oss.sonatype.org/service/local/staging/deploy/maven2/' :
|
|
'https://oss.sonatype.org/content/repositories/snapshots/'
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
sign publishing.publications.mavenJava
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
tasks.withType(GenerateModuleMetadata) {
|
|
enabled = false
|
|
}
|
|
|
|
jacocoTestReport {
|
|
dependsOn test // tests are required to run before generating the report
|
|
reports {
|
|
csv.required = false
|
|
xml.required = true
|
|
xml.outputLocation = layout.buildDirectory.file('reports/jacoco/report.xml')
|
|
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
|
|
}
|
|
}
|
|
|