2019-11-14 17:49:27 +01:00
|
|
|
plugins {
|
2022-07-30 16:32:05 +02:00
|
|
|
id 'org.jetbrains.kotlin.jvm' version '1.7.10' apply false
|
2022-06-04 13:19:58 +02:00
|
|
|
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
|
2021-05-01 23:06:13 +02:00
|
|
|
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
|
2019-11-14 17:49:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
2022-05-16 23:24:43 +02:00
|
|
|
PUBLISH_VERSION = '1.6.4'
|
2019-11-14 18:34:40 +01:00
|
|
|
SITE_URL = 'https://github.com/wulkanowy/sdk'
|
|
|
|
GIT_URL = 'https://github.com/wulkanowy/sdk.git'
|
|
|
|
|
2019-11-14 17:49:27 +01:00
|
|
|
jspoon = "1.3.2"
|
2022-07-30 16:32:05 +02:00
|
|
|
jsoup = "1.15.2"
|
2022-06-18 12:24:28 +02:00
|
|
|
okhttp3 = "4.10.0"
|
2021-05-01 16:37:39 +02:00
|
|
|
retrofit = "2.9.0"
|
2022-03-04 12:54:24 +01:00
|
|
|
slf4j = "1.7.36"
|
2022-02-28 20:57:08 +01:00
|
|
|
moshi = "1.13.0"
|
2022-07-30 16:48:58 +02:00
|
|
|
coroutines = "1.6.4"
|
2019-11-14 17:49:27 +01:00
|
|
|
}
|
|
|
|
|
2021-05-01 23:06:13 +02:00
|
|
|
version = PUBLISH_VERSION
|
|
|
|
group = "io.github.wulkanowy"
|
|
|
|
|
|
|
|
nexusPublishing {
|
|
|
|
repositories {
|
|
|
|
sonatype {
|
|
|
|
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
|
|
|
|
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
|
|
|
|
username = System.getenv("MAVEN_USERNAME")
|
|
|
|
password = System.getenv("MAVEN_PASSWORD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-14 11:26:25 +01:00
|
|
|
allprojects {
|
2019-11-14 17:49:27 +01:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'kotlin'
|
2021-05-01 23:06:13 +02:00
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
apply plugin: 'signing'
|
2019-11-17 17:14:24 +01:00
|
|
|
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
2019-12-23 19:19:30 +01:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven { url "https://jitpack.io" }
|
|
|
|
}
|
2019-11-17 17:14:24 +01:00
|
|
|
|
2020-06-14 23:33:39 +02:00
|
|
|
dependencies {
|
|
|
|
implementation "org.slf4j:slf4j-api:$slf4j"
|
|
|
|
testImplementation "org.slf4j:slf4j-simple:$slf4j"
|
2021-09-18 11:12:27 +02:00
|
|
|
implementation platform("com.squareup.okhttp3:okhttp-bom:$okhttp3")
|
2020-06-14 23:33:39 +02:00
|
|
|
}
|
|
|
|
|
2021-05-01 23:06:13 +02:00
|
|
|
java {
|
|
|
|
withJavadocJar()
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
sdk(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
version = rootProject.version
|
|
|
|
|
|
|
|
pom {
|
|
|
|
name = 'VULCAN UONET+ SDK'
|
|
|
|
description = 'Unified way of retrieving data from the UONET+ register through mobile api and scraping api'
|
|
|
|
url = 'https://github.com/wulkanowy/sdk'
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name = 'The Apache License, Version 2.0'
|
|
|
|
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id = 'mklkj'
|
|
|
|
name = 'Mikołaj Pich'
|
|
|
|
email = 'm.pich@outlook.com'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
|
|
|
connection = 'https://github.com/wulkanowy/sdk.git'
|
|
|
|
developerConnection = 'git@github.com:wulkanowy/sdk.git'
|
|
|
|
url = 'https://github.com/wulkanowy/sdk'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-01 23:45:11 +02:00
|
|
|
if (System.getenv("MAVEN_SIGNING_KEY")) {
|
|
|
|
signing {
|
|
|
|
def signingKey = System.getenv("MAVEN_SIGNING_KEY") ?: ""
|
|
|
|
def signingPassword = System.getenv("MAVEN_SIGNING_PASSWORD")
|
|
|
|
useInMemoryPgpKeys(new String(signingKey.decodeBase64()), signingPassword)
|
|
|
|
sign publishing.publications.sdk
|
|
|
|
}
|
2021-05-01 23:06:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
javadoc {
|
|
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
|
|
options.addBooleanOption('html5', true)
|
2019-12-22 17:46:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-12-23 19:19:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply plugin: 'jacoco'
|
2019-12-22 17:46:54 +01:00
|
|
|
|
2019-11-17 17:14:24 +01:00
|
|
|
ktlint {
|
|
|
|
additionalEditorconfigFile = file(".editorconfig")
|
|
|
|
disabledRules = [
|
|
|
|
"no-wildcard-imports",
|
|
|
|
"import-ordering",
|
|
|
|
"max-line-length"
|
|
|
|
]
|
|
|
|
}
|
2019-11-14 17:49:27 +01:00
|
|
|
|
2022-07-30 16:32:05 +02:00
|
|
|
sourceCompatibility = 11
|
2019-11-14 17:49:27 +01:00
|
|
|
|
|
|
|
compileKotlin {
|
|
|
|
kotlinOptions {
|
2022-07-30 16:32:05 +02:00
|
|
|
jvmTarget = "11"
|
2019-11-14 17:49:27 +01:00
|
|
|
javaParameters = true
|
|
|
|
}
|
|
|
|
}
|
2021-05-01 16:37:39 +02:00
|
|
|
compileTestKotlin {
|
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
|
|
}
|
2019-11-14 17:49:27 +01:00
|
|
|
|
|
|
|
dependencies {
|
2021-08-22 10:31:43 +02:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines"
|
2019-11-14 13:36:46 +01:00
|
|
|
|
2021-09-18 11:12:27 +02:00
|
|
|
implementation "com.squareup.okhttp3:logging-interceptor"
|
2019-11-14 17:49:27 +01:00
|
|
|
|
2021-02-26 10:43:37 +01:00
|
|
|
testImplementation "junit:junit:4.13.2"
|
2021-09-18 11:12:27 +02:00
|
|
|
testImplementation "com.squareup.okhttp3:mockwebserver"
|
2020-08-08 11:04:03 +02:00
|
|
|
testImplementation "com.squareup.retrofit2:retrofit-mock:$retrofit"
|
2021-08-22 10:31:43 +02:00
|
|
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
|
2019-11-14 17:49:27 +01:00
|
|
|
}
|
2019-11-14 18:34:40 +01:00
|
|
|
|
2019-11-17 17:14:24 +01:00
|
|
|
jacocoTestReport {
|
|
|
|
reports {
|
|
|
|
xml.enabled true
|
|
|
|
}
|
|
|
|
}
|
2021-05-16 21:20:49 +02:00
|
|
|
jacoco {
|
|
|
|
toolVersion "0.8.7"
|
|
|
|
}
|
2019-11-17 17:14:24 +01:00
|
|
|
|
2019-11-17 17:32:58 +01:00
|
|
|
test {
|
|
|
|
testLogging.showStandardStreams = false
|
|
|
|
}
|
|
|
|
|
2019-12-23 19:20:15 +01:00
|
|
|
group = "io.github.wulkanowy.sdk"
|
2018-08-30 17:22:28 +02:00
|
|
|
}
|
2019-12-23 19:20:15 +01:00
|
|
|
|
|
|
|
dependencies {
|
2021-09-28 14:15:12 +02:00
|
|
|
api project(":sdk")
|
|
|
|
api project(":sdk-mobile")
|
|
|
|
api project(":sdk-scrapper")
|
2020-01-10 15:14:46 +01:00
|
|
|
|
2021-09-28 14:15:12 +02:00
|
|
|
api "com.squareup.okhttp3:okhttp"
|
2019-12-23 19:20:15 +01:00
|
|
|
}
|