diff --git a/core/settings.gradle b/core/settings.gradle deleted file mode 100644 index 9ed4be64..00000000 --- a/core/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'postssystem.core' diff --git a/exposed/settings.gradle b/exposed/settings.gradle deleted file mode 100644 index 8208fa41..00000000 --- a/exposed/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name="postssystem.core-exposed" \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f1cf3885..3c917bb3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,6 @@ gradle_bintray_plugin_version=1.8.4 project_public_version=0.1.0 project_public_group=com.insanusmokrassar -project_public_name=PostsSystemCore project_public_description=Core library for PostsSystem disableImplicitReflectionSerializerAnnotation=-Xexperimental=kotlinx.serialization.ImplicitReflectionSerializer diff --git a/core/build.gradle b/postssystem.core/build.gradle similarity index 98% rename from core/build.gradle rename to postssystem.core/build.gradle index ec53fe4e..4b13577a 100644 --- a/core/build.gradle +++ b/postssystem.core/build.gradle @@ -17,6 +17,7 @@ buildscript { apply plugin: 'kotlinx-serialization' apply plugin: 'kotlin-multiplatform' +apply from: "publish.gradle" repositories { mavenLocal() diff --git a/postssystem.core/gradle.properties b/postssystem.core/gradle.properties new file mode 100644 index 00000000..f579f4b7 --- /dev/null +++ b/postssystem.core/gradle.properties @@ -0,0 +1 @@ +project_vcs_base=https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore diff --git a/postssystem.core/maven.publish.gradle b/postssystem.core/maven.publish.gradle new file mode 100644 index 00000000..9979b673 --- /dev/null +++ b/postssystem.core/maven.publish.gradle @@ -0,0 +1,63 @@ +apply plugin: 'maven-publish' +apply plugin: 'signing' + +task javadocJar(type: Jar) { + archiveClassifier.set 'javadoc' +} + +kotlin { + jvm("jvm8") { + mavenPublication { + groupId "${project.group}" + artifactId "${project.name}-jvm" + version "${project.version}" + + artifact(javadocJar) + } + } +} + +publishing { + publications { + jvm8 { + pom.withXml { + asNode().children().last() + { + resolveStrategy = Closure.DELEGATE_FIRST + name "${project.name}-jvm" + description "${project_public_description}" + + scm { + developerConnection "scm:git:[fetch=]${project_vcs_base}/${project.name}.git[push=]ssh:git@github.com:insanusmokrassar/${project.name}.git" + url "${project_vcs_base}/${project.name}" + } + + developers { + developer { + id "InsanusMokrassar" + name "Ovsyannikov Alexey" + email "ovsyannikov.alexey95@gmail.com" + } + developer { + id "mi-ast" + name "Michail Astafiev" + email "astaf65@gmail.com" + } + } + + licenses { + license { + name "The Apache Software License, Version 2.0" + url "${project_vcs_base}/${project.name}/blob/master/LICENSE" + distribution "repo" + } + } + } + } + } + } +} + +signing { + useGpgCmd() + sign publishing.publications.jvm8 +} diff --git a/postssystem.core/publish.gradle b/postssystem.core/publish.gradle new file mode 100644 index 00000000..ee8ca554 --- /dev/null +++ b/postssystem.core/publish.gradle @@ -0,0 +1,30 @@ +apply plugin: 'com.jfrog.bintray' + +ext { + projectBintrayDir = "${project.group}/".replace(".", "/") + "${project.name}/${project.version}" +} + +apply from: "maven.publish.gradle" + +bintray { + 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') + publications = ["jvm8"] + filesSpec { + into projectBintrayDir + from signJvm8Publication + rename "pom.*\\.xml(.*)", "${project.name}-${project.version}.pom\$1" + rename "(.*)jvm8-(.*)", "\$1\$2" + } + pkg { + repo = 'InsanusMokrassar' + name = "${project.name}" + vcsUrl = "${project_vcs_base}/${project.name}" + licenses = ['Apache-2.0'] + version { + name = "${project.version}" + released = new Date() + vcsTag = name + } + } +} diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/Content.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ContentAPI.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ContentAPI.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ContentAPI.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ContentAPI.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ReadContentAPI.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ReadContentAPI.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ReadContentAPI.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/ReadContentAPI.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/WriteContentAPI.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/WriteContentAPI.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/WriteContentAPI.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/content/api/WriteContentAPI.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/PostsAPI.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/PostsAPI.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/PostsAPI.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/PostsAPI.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/ReadPostsAPI.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/ReadPostsAPI.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/ReadPostsAPI.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/ReadPostsAPI.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/WritePostsAPI.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/WritePostsAPI.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/WritePostsAPI.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/post/api/WritePostsAPI.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/DateTimeUtils.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/DateTimeUtils.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/DateTimeUtils.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/DateTimeUtils.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/IdUtils.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/IdUtils.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/IdUtils.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/IdUtils.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/Pagination.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/Pagination.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/Pagination.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/Pagination.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/PaginationResult.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/PaginationResult.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/PaginationResult.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/PaginationResult.kt diff --git a/core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/SimplePagination.kt b/postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/SimplePagination.kt similarity index 100% rename from core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/SimplePagination.kt rename to postssystem.core/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/utils/pagination/SimplePagination.kt diff --git a/core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryContentAPI.kt b/postssystem.core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryContentAPI.kt similarity index 100% rename from core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryContentAPI.kt rename to postssystem.core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryContentAPI.kt diff --git a/core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt b/postssystem.core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt similarity index 100% rename from core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt rename to postssystem.core/src/commonTest/kotlin/com/insanusmokrassar/postssystem/core/api/InMemoryPostsAPI.kt diff --git a/exposed/build.gradle b/postssystem.exposed/build.gradle similarity index 95% rename from exposed/build.gradle rename to postssystem.exposed/build.gradle index 53208249..36989b80 100644 --- a/exposed/build.gradle +++ b/postssystem.exposed/build.gradle @@ -27,7 +27,7 @@ repositories { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation project(":core") + implementation project(":postssystem.core") api "org.jetbrains.exposed:exposed:$exposed_version" testImplementation "org.xerial:sqlite-jdbc:$test_sqlite_version" diff --git a/exposed/gradle.properties b/postssystem.exposed/gradle.properties similarity index 100% rename from exposed/gradle.properties rename to postssystem.exposed/gradle.properties diff --git a/exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPI.kt b/postssystem.exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPI.kt similarity index 100% rename from exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPI.kt rename to postssystem.exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPI.kt diff --git a/exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPI.kt b/postssystem.exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPI.kt similarity index 100% rename from exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPI.kt rename to postssystem.exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPI.kt diff --git a/exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedUtils.kt b/postssystem.exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedUtils.kt similarity index 100% rename from exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedUtils.kt rename to postssystem.exposed/src/main/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedUtils.kt diff --git a/exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPICommonTests.kt b/postssystem.exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPICommonTests.kt similarity index 100% rename from exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPICommonTests.kt rename to postssystem.exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedContentAPICommonTests.kt diff --git a/exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPICommonTests.kt b/postssystem.exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPICommonTests.kt similarity index 100% rename from exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPICommonTests.kt rename to postssystem.exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsAPICommonTests.kt diff --git a/settings.gradle b/settings.gradle index 7bbe7dab..e0abbe58 100644 --- a/settings.gradle +++ b/settings.gradle @@ -15,5 +15,7 @@ include 'api' include 'services:webservice' */ -include ':core' -include ':exposed' +rootProject.name='postssystem' +include ':postssystem.core' +include ':postssystem.exposed' +enableFeaturePreview("GRADLE_METADATA")