166 lines
4.6 KiB
Groovy
166 lines
4.6 KiB
Groovy
plugins {
|
|
alias(libs.plugins.kotlin) apply false
|
|
alias(libs.plugins.ksp) apply false
|
|
alias(libs.plugins.serialization)
|
|
id "org.jlleitschuh.gradle.ktlint" version "12.1.0"
|
|
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
|
|
id 'ru.vyarus.mkdocs' version '3.0.0'
|
|
}
|
|
mkdocs.sourcesDir = 'docs'
|
|
|
|
ext {
|
|
SITE_URL = 'https://github.com/wulkanowy/sdk'
|
|
GIT_URL = 'https://github.com/wulkanowy/sdk.git'
|
|
|
|
jspoon = "1.3.2"
|
|
jsoup = "1.17.2"
|
|
slf4j = "2.0.12"
|
|
moshi = "1.13.0"
|
|
}
|
|
|
|
version = "2.7.0"
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'signing'
|
|
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
|
apply plugin: 'kotlinx-serialization'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
|
|
maven { url "https://jitpack.io" }
|
|
}
|
|
|
|
dependencies {
|
|
implementation "org.slf4j:slf4j-api:$slf4j"
|
|
testImplementation "org.slf4j:slf4j-simple:$slf4j"
|
|
|
|
implementation platform(libs.okhttp.bom)
|
|
}
|
|
|
|
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'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
javadoc {
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
options.addBooleanOption('html5', true)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'jacoco'
|
|
|
|
ktlint {
|
|
// additionalEditorconfigFile.set(file(".editorconfig"))
|
|
disabledRules = [
|
|
"no-wildcard-imports",
|
|
"import-ordering",
|
|
"max-line-length",
|
|
"multiline-if-else"
|
|
]
|
|
filter {
|
|
exclude { element -> element.file.path.contains("generated/") }
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain {
|
|
languageVersion.set(JavaLanguageVersion.of("11"))
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.coroutines.core
|
|
|
|
implementation "com.squareup.okhttp3:logging-interceptor"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
|
|
|
|
testImplementation "junit:junit:4.13.2"
|
|
testImplementation "com.squareup.okhttp3:mockwebserver"
|
|
testImplementation libs.retrofit.mock
|
|
testImplementation libs.coroutines.test
|
|
}
|
|
|
|
jacocoTestReport {
|
|
reports {
|
|
xml.getRequired().set(true)
|
|
}
|
|
}
|
|
jacoco {
|
|
toolVersion "0.8.10"
|
|
}
|
|
|
|
test {
|
|
testLogging.showStandardStreams = false
|
|
}
|
|
|
|
group = "io.github.wulkanowy.sdk"
|
|
}
|
|
|
|
dependencies {
|
|
api project(":sdk")
|
|
api project(":sdk-hebe")
|
|
api project(":sdk-scrapper")
|
|
|
|
api "com.squareup.okhttp3:okhttp"
|
|
}
|