update type of exposed library
This commit is contained in:
parent
15157fa4c3
commit
d0b0cad94c
@ -1,6 +1,3 @@
|
|||||||
project.version = "$core_version"
|
|
||||||
project.group = "com.insanusmokrassar"
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
@ -15,9 +12,13 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java-library'
|
plugins {
|
||||||
apply plugin: 'kotlinx-serialization'
|
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
|
||||||
apply plugin: 'kotlin'
|
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
||||||
|
}
|
||||||
|
|
||||||
|
project.version = "$core_version"
|
||||||
|
project.group = "com.insanusmokrassar"
|
||||||
|
|
||||||
apply from: "publish.gradle"
|
apply from: "publish.gradle"
|
||||||
|
|
||||||
@ -28,18 +29,37 @@ repositories {
|
|||||||
maven { url "https://kotlin.bintray.com/kotlinx" }
|
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
kotlin {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
jvm()
|
||||||
api "org.jetbrains.exposed:exposed-core:$exposed_version"
|
js()
|
||||||
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
|
||||||
|
|
||||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
sourceSets {
|
||||||
api "com.insanusmokrassar:postssystem.core:$core_version"
|
commonMain {
|
||||||
} else {
|
dependencies {
|
||||||
implementation project(":postssystem.core")
|
implementation kotlin('stdlib')
|
||||||
|
api "org.jetbrains.exposed:exposed-core:$exposed_version"
|
||||||
|
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
||||||
|
|
||||||
|
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||||
|
api "com.insanusmokrassar:postssystem.core:$core_version"
|
||||||
|
} else {
|
||||||
|
implementation project(":postssystem.core")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-common')
|
||||||
|
implementation kotlin('test-annotations-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jvmTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-junit')
|
||||||
|
implementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
testImplementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api:$test_junit_version"
|
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,39 @@
|
|||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task javadocsJar(type: Jar) {
|
||||||
from sourceSets.main.allSource
|
|
||||||
classifier = 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
task javadocJar(type: Jar) {
|
|
||||||
from javadoc
|
|
||||||
classifier = 'javadoc'
|
classifier = 'javadoc'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
project.publishing.publications.all {
|
||||||
|
// rename artifacts
|
||||||
|
groupId "${project.group}"
|
||||||
|
if (it.name.contains('kotlinMultiplatform')) {
|
||||||
|
artifactId = "${project.name}"
|
||||||
|
} else {
|
||||||
|
artifactId = "${project.name}-$name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications.all {
|
||||||
maven(MavenPublication) {
|
artifact javadocsJar
|
||||||
from components.java
|
|
||||||
groupId "${project.group}"
|
|
||||||
artifactId "${project.name}"
|
|
||||||
version "${project.version}"
|
|
||||||
|
|
||||||
artifact sourcesJar
|
pom.withXml {
|
||||||
artifact javadocJar
|
asNode().children().last() + {
|
||||||
|
resolveStrategy = Closure.DELEGATE_FIRST
|
||||||
|
|
||||||
pom.withXml {
|
description "Exposed realisation for PostsSystem Core"
|
||||||
asNode().children().last() + {
|
name "PostsSystem Core Exposed realization"
|
||||||
resolveStrategy = Closure.DELEGATE_FIRST
|
url "https://git.insanusmokrassar.com/PostsSystem/Core/"
|
||||||
|
|
||||||
description "Exposed realisation for PostsSystem Core"
|
scm {
|
||||||
name "PostsSystem Core Exposed realization"
|
developerConnection "scm:git:[fetch=]https://git.insanusmokrassar.com/PostsSystem/Core/.git[push=]https://git.insanusmokrassar.com/PostsSystem/Core/.git"
|
||||||
url "https://git.insanusmokrassar.com/PostsSystem/Core/"
|
url "https://git.insanusmokrassar.com/PostsSystem/Core/.git"
|
||||||
|
}
|
||||||
|
|
||||||
scm {
|
developers {
|
||||||
developerConnection "scm:git:[fetch=]https://git.insanusmokrassar.com/PostsSystem/Core/.git[push=]https://git.insanusmokrassar.com/PostsSystem/Core/.git"
|
|
||||||
url "https://git.insanusmokrassar.com/PostsSystem/Core/.git"
|
|
||||||
}
|
|
||||||
|
|
||||||
developers {
|
|
||||||
|
|
||||||
developer {
|
developer {
|
||||||
id "InsanusMokrassar"
|
id "InsanusMokrassar"
|
||||||
@ -42,16 +41,15 @@ publishing {
|
|||||||
email "ovsyannikov.alexey95@gmail.com"
|
email "ovsyannikov.alexey95@gmail.com"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
licenses {
|
licenses {
|
||||||
|
|
||||||
license {
|
license {
|
||||||
name "Apache Software License 2.0"
|
name "Apache Software License 2.0"
|
||||||
url "https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"
|
url "https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,22 +2,28 @@ apply plugin: 'com.jfrog.bintray'
|
|||||||
|
|
||||||
apply from: "maven.publish.gradle"
|
apply from: "maven.publish.gradle"
|
||||||
|
|
||||||
ext {
|
|
||||||
projectBintrayDir = "${project.group}/".replace(".", "/") + "${project.name}/${project.version}"
|
|
||||||
}
|
|
||||||
|
|
||||||
bintray {
|
bintray {
|
||||||
user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
|
user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
|
||||||
key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||||
publications = ["maven"]
|
|
||||||
filesSpec {
|
filesSpec {
|
||||||
into "$projectBintrayDir"
|
from "${buildDir}/publications/"
|
||||||
from("build/libs") {
|
eachFile {
|
||||||
include "**/*.asc"
|
String directorySubname = it.getFile().parentFile.name
|
||||||
}
|
if (it.getName() == "module.json") {
|
||||||
from("build/publications/maven") {
|
if (directorySubname == "kotlinMultiplatform") {
|
||||||
rename 'pom-default.xml(.*)', "${project.name}-${project.version}.pom\$1"
|
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.module")
|
||||||
|
} else {
|
||||||
|
it.setPath("${project.name}-${directorySubname}/${project.version}/${project.name}-${directorySubname}-${project.version}.module")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (directorySubname == "kotlinMultiplatform" && it.getName() == "pom-default.xml") {
|
||||||
|
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.pom")
|
||||||
|
} else {
|
||||||
|
it.exclude()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
into "${project.group}".replace(".", "/")
|
||||||
}
|
}
|
||||||
pkg {
|
pkg {
|
||||||
repo = "InsanusMokrassar"
|
repo = "InsanusMokrassar"
|
||||||
@ -36,4 +42,14 @@ bintray {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bintrayUpload.doFirst {
|
||||||
|
publications = publishing.publications.collect {
|
||||||
|
if (it.name.contains('kotlinMultiplatform')) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
it.name
|
||||||
|
}
|
||||||
|
} - null
|
||||||
|
}
|
||||||
|
|
||||||
bintrayUpload.dependsOn publishToMavenLocal
|
bintrayUpload.dependsOn publishToMavenLocal
|
Loading…
Reference in New Issue
Block a user