Space publishing
This commit is contained in:
parent
7a282fa207
commit
615b06eb8c
@ -4,10 +4,11 @@ plugins {
|
||||
`kotlin-dsl`
|
||||
`maven-publish`
|
||||
id("com.jfrog.bintray") version "1.8.5"
|
||||
id("org.jetbrains.changelog") version "0.3.2"
|
||||
}
|
||||
|
||||
group = "scientifik"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
@ -55,12 +56,6 @@ gradlePlugin {
|
||||
description = "Pre-configured JS project"
|
||||
implementationClass = "scientifik.ScientifikJSPlugin"
|
||||
}
|
||||
|
||||
// create("scientifik-atomic") {
|
||||
// id = "scientifik.atomic"
|
||||
// description = "Add kotlin atomic plugin to any flafor"
|
||||
// implementationClass = "scientifik.ScientifikAtomicPlugin"
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
2
gradlew
vendored
2
gradlew
vendored
@ -82,6 +82,7 @@ esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
@ -129,6 +130,7 @@ fi
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
1
gradlew.bat
vendored
1
gradlew.bat
vendored
@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%*
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
|
@ -4,14 +4,14 @@ import org.gradle.api.JavaVersion
|
||||
* Build constants
|
||||
*/
|
||||
object Scientifik {
|
||||
const val coroutinesVersion = "1.3.4"
|
||||
const val coroutinesVersion = "1.3.7"
|
||||
const val serializationVersion = "0.20.0"
|
||||
const val atomicVersion = "0.14.3"
|
||||
|
||||
val JVM_TARGET = JavaVersion.VERSION_11
|
||||
// val JVM_VERSION = JVM_TARGET.toString()
|
||||
val JVM_TARGET = JavaVersion.VERSION_1_8
|
||||
|
||||
object Serialization{
|
||||
const val xmlVersion = "0.20.0.0"
|
||||
const val xmlVersion = "0.20.0.1"
|
||||
const val yamlVersion = "0.16.1"
|
||||
const val bsonVersion = "0.2.1"
|
||||
}
|
||||
|
@ -10,9 +10,7 @@ import org.gradle.kotlin.dsl.getting
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension
|
||||
|
||||
open class ScientifikJSPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
|
||||
with(project) {
|
||||
override fun apply(project: Project): Unit = project.run {
|
||||
plugins.apply("org.jetbrains.kotlin.js")
|
||||
|
||||
repositories.applyRepos()
|
||||
@ -65,4 +63,3 @@ open class ScientifikJSPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -15,8 +15,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
with(project) {
|
||||
override fun apply(project: Project): Unit = project.run {
|
||||
plugins.apply("org.jetbrains.kotlin.jvm")
|
||||
|
||||
repositories.applyRepos()
|
||||
@ -67,7 +66,7 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
pluginManager.withPlugin("org.jetbrains.dokka") {
|
||||
logger.info("Adding dokka functionality to project ${this@with.name}")
|
||||
logger.info("Adding dokka functionality to project ${project.name}")
|
||||
|
||||
val dokka by tasks.getting(DokkaTask::class) {
|
||||
outputFormat = "html"
|
||||
@ -98,4 +97,3 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -14,8 +14,7 @@ import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
|
||||
open class ScientifikMPPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
project.run {
|
||||
override fun apply(project: Project): Unit = project.run {
|
||||
|
||||
plugins.apply("org.jetbrains.kotlin.multiplatform")
|
||||
|
||||
@ -137,4 +136,3 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -15,14 +15,14 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
|
||||
project.plugins.apply("maven-publish")
|
||||
|
||||
project.run {
|
||||
project.afterEvaluate {
|
||||
val githubProject = findProperty("githubProject") as? String
|
||||
val vcs = findProperty("vcs") as? String
|
||||
?: githubProject?.let { "https://github.com/mipt-npm/$it" }
|
||||
|
||||
if (vcs == null) {
|
||||
project.logger.warn("[${project.name}] Missing deployment configuration. Skipping publish.")
|
||||
return@apply
|
||||
return@afterEvaluate
|
||||
}
|
||||
|
||||
project.configure<PublishingExtension> {
|
||||
@ -75,6 +75,24 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
val spaceRepo: String? by project
|
||||
val spaceUser: String? by project
|
||||
val spaceToken: String? by project
|
||||
|
||||
if (spaceRepo != null && spaceUser != null && spaceToken != null) {
|
||||
project.logger.info("Adding mipt-npm Space publishing to project [${project.name}]")
|
||||
repositories {
|
||||
maven {
|
||||
name = "space"
|
||||
url = uri(spaceRepo!!)
|
||||
credentials {
|
||||
username = spaceUser
|
||||
password = spaceToken
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val bintrayOrg = project.findProperty("bintrayOrg") as? String ?: "mipt-npm"
|
||||
val bintrayUser = project.findProperty("bintrayUser") as? String
|
||||
|
@ -21,7 +21,7 @@ enum class DependencySourceSet(val setName: String, val suffix: String) {
|
||||
internal fun Project.useDependency(
|
||||
vararg pairs: Pair<String, String>,
|
||||
dependencySourceSet: DependencySourceSet = DependencySourceSet.MAIN,
|
||||
dependencyConfiguration: DependencyConfiguration = DependencyConfiguration.API
|
||||
dependencyConfiguration: DependencyConfiguration = DependencyConfiguration.IMPLEMENTATION
|
||||
) {
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
|
||||
extensions.findByType<KotlinMultiplatformExtension>()?.apply {
|
||||
@ -86,12 +86,12 @@ fun Project.useCoroutines(
|
||||
dependencyConfiguration = configuration
|
||||
)
|
||||
|
||||
//fun Project.atomic(version: String = Scientifik.atomicfuVersion) {
|
||||
// plugins.apply("kotlinx-atomicfu")
|
||||
// useDependency(
|
||||
// "commonMain" to "org.jetbrains.kotlinx:atomicfu-common:$version",
|
||||
// "jvmMain" to "org.jetbrains.kotlinx:atomicfu:$version",
|
||||
// "jsMain" to "org.jetbrains.kotlinx:atomicfu-js:$version",
|
||||
// "nativeMain" to "org.jetbrains.kotlinx:atomicfu-native:$version"
|
||||
// )
|
||||
//}
|
||||
fun Project.useAtomic(version: String = Scientifik.atomicVersion) {
|
||||
plugins.apply("kotlinx-atomicfu")
|
||||
useDependency(
|
||||
"commonMain" to "org.jetbrains.kotlinx:atomicfu-common:$version",
|
||||
"jvmMain" to "org.jetbrains.kotlinx:atomicfu:$version",
|
||||
"jsMain" to "org.jetbrains.kotlinx:atomicfu-js:$version",
|
||||
"nativeMain" to "org.jetbrains.kotlinx:atomicfu-native:$version"
|
||||
)
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ val defaultPlatform: FXPlatform = when {
|
||||
else -> error("Platform not recognized")
|
||||
}
|
||||
|
||||
fun KotlinDependencyHandler.addFXDependencies(
|
||||
private fun KotlinDependencyHandler.addFXDependencies(
|
||||
vararg modules: FXModule,
|
||||
configuration: DependencyConfiguration,
|
||||
version: String = "14",
|
||||
|
@ -83,7 +83,8 @@ fun Project.useSerialization(
|
||||
"jvm" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$version",
|
||||
"js" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$version",
|
||||
"native" to "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$version",
|
||||
dependencySourceSet = sourceSet
|
||||
dependencySourceSet = sourceSet,
|
||||
dependencyConfiguration = configuration
|
||||
)
|
||||
SerializationTargets(sourceSet, configuration).apply(block)
|
||||
}
|
Loading…
Reference in New Issue
Block a user