Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Kotlin 1.4.21 #2

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
76c9a30
Update to Kotlin 1.4.21
molmsted98 Dec 8, 2020
e9a0c17
Update to Kotlin 1.4.23
molmsted98 May 6, 2021
90659dd
Remove POM publishing
molmsted98 Jun 1, 2021
d6dcde4
Remove jcenter repository
molmsted98 Jun 2, 2021
395b21f
Handle publishing jar without classifier
molmsted98 Jun 2, 2021
d43f8fb
Apply jar publishing change to jvm
molmsted98 Jun 2, 2021
8c3d5ff
Select proper artifact id
molmsted98 Jun 2, 2021
a8f09e4
Correct typo in task name
molmsted98 Jun 2, 2021
cdd81a7
Publish sources jar
molmsted98 Jun 2, 2021
f870632
Add sourcesJar definition
molmsted98 Jun 2, 2021
4fe9109
Remove extra build artifacts
molmsted98 Jun 11, 2021
66e9a18
Add build artifacts
molmsted98 Jun 18, 2021
5a1765a
Remove docs artifacts
molmsted98 Jul 7, 2021
4a05814
Update Kotlin/Gradle
molmsted98 Jul 7, 2021
c453304
Remove GradleMetadata Preview
molmsted98 Jul 7, 2021
f7d0ec5
Remove tasks from gradle push
molmsted98 Jul 7, 2021
3222874
Try to publish sources jar
molmsted98 Jul 9, 2021
6413517
Remove sourcesJar task
molmsted98 Jul 9, 2021
6caef06
Remove multiplatform check
molmsted98 Jul 9, 2021
ee6b4e7
Remove artifact assigning
molmsted98 Jul 9, 2021
4f9cbb4
Remove application of gradle script
molmsted98 Jul 9, 2021
06eaecb
Add publish classpath
molmsted98 Jul 9, 2021
030bd5b
Add POM information
molmsted98 Jul 9, 2021
b031176
Add pom artifact
molmsted98 Jul 9, 2021
74f3f66
Bump maven publish classpath
molmsted98 Jul 9, 2021
9387568
Bump version number
molmsted98 Jul 9, 2021
34a7f7e
Add repositories
molmsted98 Jul 9, 2021
0e447be
Add signing config
molmsted98 Jul 9, 2021
2373a98
Bump version number
molmsted98 Jul 9, 2021
9abc064
Disable signing
molmsted98 Jul 9, 2021
62d75b2
Bump version number
molmsted98 Jul 9, 2021
d78aec4
Add module-based artifact ids
molmsted98 Jul 9, 2021
3ab8dc3
Add iOS targets
molmsted98 Jul 9, 2021
22ca2d8
Add all other targets
molmsted98 Jul 9, 2021
94b9f50
Add ios targets
molmsted98 Jul 9, 2021
1d705d9
Remove ios target names
molmsted98 Jul 9, 2021
ddd4b3c
Bump version number
molmsted98 Jul 9, 2021
8826128
Revert ios targets
molmsted98 Jul 9, 2021
bcbc79b
Update to Kotlin 1.5.21
molmsted98 Aug 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath(deps.Kotlin.Gradle.Plugin)
classpath(deps.Dokka.Gradle.Plugin)
classpath("com.vanniktech:gradle-maven-publish-plugin:0.17.0")
}
}

subprojects {
repositories {
mavenCentral()
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/deps/deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Dokka : Group("org.jetbrains.dokka", "0.10.1") {
}
}

object Kotlin : Group("org.jetbrains.kotlin", "1.3.72") {
object Kotlin : Group("org.jetbrains.kotlin", "1.5.21") {
val StdLib = artifact("kotlin-stdlib")

object Gradle {
Expand Down
27 changes: 17 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
GROUP=com.michaelpardo.max
VERSION_NAME=0.1.0-SNAPSHOT
POM_DESCRIPTION=Max
POM_URL=https://github.com/pardom/max/
POM_SCM_URL=https://github.com/pardom/max/
POM_SCM_CONNECTION=scm:git:git://github.com/pardom/max.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/pardom/max.git
kotlin.native.ignoreDisabledTargets=true
kotlin.native.distribution.type=prebuilt
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.enableCompatibilityMetadataVariant=true

GROUP=com.github.molmsted98.max
VERSION_NAME=1.0.33

POM_INCEPTION_YEAR=2021

POM_URL=https://github.com/molmsted98/max/
POM_SCM_URL=https://github.com/molmsted98/max/
POM_SCM_CONNECTION=scm:git:git://github.com/molmsted98/max.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=michaelpardo
POM_DEVELOPER_NAME=Michael Pardo

kotlin.native.ignoreDisabledTargets=true
POM_DEVELOPER_ID=molmsted98
POM_DEVELOPER_NAME=Michael Olmsted
POM_DEVELOPER_URL=https://github.com/molmsted98/
127 changes: 24 additions & 103 deletions gradle/gradle-mvn-mpp-push.gradle
Original file line number Diff line number Diff line change
@@ -1,112 +1,33 @@
apply plugin: 'java-gradle-plugin'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'org.jetbrains.dokka'

dokka {
outputDirectory = "$rootDir/docs"
outputFormat = "gfm"

multiplatform {
global {
sourceLink {
path = "max/src/commonMain/kotlin"
url = "https://github.com/pardom/max/tree/master/max/src/commonMain/kotlin"
lineSuffix = "#L"
}
}
common {}
static def selectArtifactId(project, type, defaultName) {
def name = project.name
def isCommon = project.ext.has("commonStructure")
def commonIsRoot = project.ext.has("commonStructure") && project.ext.commonStructure
def hasNative = project.ext.has("hasNative") && project.ext.hasNative
switch (type) {
case 'metadata':
if (!isCommon) return "$name-$type"
return "$name-metadata"
break
case 'kotlinMultiplatform':
if (!hasNative) return "$name-kotlinMultiplatform"
return name
break
case 'jvm':
return commonIsRoot ? "$name-jvm" : "$name"
break
default:
return isCommon || hasNative ? defaultName : "$name"
break
}
}

def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL :
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL :
"https://oss.sonatype.org/content/repositories/snapshots/"
}

def getRepositoryUsername() {
return hasProperty('SONATYPE_NEXUS_USERNAME') ? SONATYPE_NEXUS_USERNAME : ""
}

def getRepositoryPassword() {
return hasProperty('SONATYPE_NEXUS_PASSWORD') ? SONATYPE_NEXUS_PASSWORD : ""
}

task emptySourcesJar(type: Jar) {
classifier = 'sources'
}

task javadocsJar(type: Jar, dependsOn: dokka) {
classifier = 'javadoc'
from dokka.outputDirectory
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign(publishing.publications)
}

publishing {
publications.all {
artifact javadocsJar

pom.withXml {
def root = asNode()

root.children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST

description POM_DESCRIPTION
name POM_NAME
url POM_URL
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
}
}
}

afterEvaluate {
publications.getByName('kotlinMultiplatform') {
// Source jars are only created for platforms, not the common artifact.
artifact emptySourcesJar
}
}

repositories {
maven {
url isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl()
credentials {
username getRepositoryUsername()
password getRepositoryPassword()
}
}
maven {
name 'test'
url "file://${rootProject.buildDir}/localMaven"
publications {
pluginMaven(MavenPublication) {
it.artifactId = selectArtifactId(project, it.name, it.artifactId)
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
30 changes: 18 additions & 12 deletions matcher/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeTargetPreset

val GROUP: String by project
val VERSION_NAME: String by project

group = GROUP
version = VERSION_NAME

plugins {
kotlin("multiplatform")
}

repositories {
jcenter()
id("com.vanniktech.maven.publish")
}

kotlin {
jvm()

js {
browser()
nodejs()
}

ios()
tvos()
watchos()

linuxX64()
macosX64()
mingwX64()

sourceSets {
val commonMain by getting {
dependencies {
Expand Down Expand Up @@ -46,10 +50,12 @@ kotlin {
}
}

tasks.withType(Sign::class) {
enabled = false
}

tasks.withType(Test::class) {
useJUnitPlatform {
includeEngines("spek2")
}
}

apply("$rootDir/gradle/gradle-mvn-mpp-push.gradle")
5 changes: 3 additions & 2 deletions matcher/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
POM_ARTIFACT_ID=max-matcher
POM_NAME=Max Matcher
POM_ARTIFACT_ID=matcher
POM_NAME=matcher
POM_DESCRIPTION=Matcher.
30 changes: 18 additions & 12 deletions navigator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeTargetPreset

val GROUP: String by project
val VERSION_NAME: String by project

group = GROUP
version = VERSION_NAME

plugins {
kotlin("multiplatform")
}

repositories {
jcenter()
id("com.vanniktech.maven.publish")
}

kotlin {
jvm()

js {
browser()
nodejs()
}

ios()
tvos()
watchos()

linuxX64()
macosX64()
mingwX64()

sourceSets {
val commonMain by getting {
dependencies {
Expand Down Expand Up @@ -48,10 +52,12 @@ kotlin {
}
}

tasks.withType(Sign::class) {
enabled = false
}

tasks.withType(Test::class) {
useJUnitPlatform {
includeEngines("spek2")
}
}

apply("$rootDir/gradle/gradle-mvn-mpp-push.gradle")
5 changes: 3 additions & 2 deletions navigator/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
POM_ARTIFACT_ID=max-navigator
POM_NAME=Max Navigator
POM_ARTIFACT_ID=navigator
POM_NAME=navigator
POM_DESCRIPTION=Navigator implementation.
30 changes: 18 additions & 12 deletions router/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeTargetPreset

val GROUP: String by project
val VERSION_NAME: String by project

group = GROUP
version = VERSION_NAME

plugins {
kotlin("multiplatform")
}

repositories {
jcenter()
id("com.vanniktech.maven.publish")
}

kotlin {
jvm()

js {
browser()
nodejs()
}

ios()
tvos()
watchos()

linuxX64()
macosX64()
mingwX64()

sourceSets {
val commonMain by getting {
dependencies {
Expand Down Expand Up @@ -48,10 +52,12 @@ kotlin {
}
}

tasks.withType(Sign::class) {
enabled = false
}

tasks.withType(Test::class) {
useJUnitPlatform {
includeEngines("spek2")
}
}

apply("$rootDir/gradle/gradle-mvn-mpp-push.gradle")
5 changes: 3 additions & 2 deletions router/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
POM_ARTIFACT_ID=max-router
POM_NAME=Max Router
POM_ARTIFACT_ID=router
POM_NAME=router
POM_DESCRIPTION=Navigation router.
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
enableFeaturePreview("GRADLE_METADATA")

include(":uri")
include(":matcher")
include(":router")
Expand Down
Loading