-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from icerockdev/develop
Release 0.1.0 dev 20
- Loading branch information
Showing
370 changed files
with
4,269 additions
and
2,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: KMP library publish dev version | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths-ignore: | ||
- '**/*.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Cocoapods install | ||
run: (cd sample/ios-app && pod install) | ||
- name: Plugin publication | ||
run: | | ||
./gradlew -p plugin -PdevPublish \ | ||
publishNoValidationToBintray \ | ||
-DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} \ | ||
--stacktrace | ||
- name: Runtime publication | ||
run: | | ||
./gradlew -PdevPublish \ | ||
publishNoValidationToBintray \ | ||
-DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} \ | ||
--stacktrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
buildSrc/src/main/kotlin/dev/icerock/moko/widgets/gradle/BintrayPublishingPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package dev.icerock.moko.widgets.gradle | ||
|
||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository | ||
import org.gradle.api.publish.plugins.PublishingPlugin | ||
|
||
class BintrayPublishingPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
// schedule after evaluate action...but no guarantee that our action will be last. | ||
// so we just shedule another afterEvaluate in our action to set action at end of evaluation :) | ||
target.afterEvaluate { | ||
target.afterEvaluate { setupNoValidationPublish(target) } | ||
} | ||
} | ||
|
||
private fun setupNoValidationPublish(project: Project) { | ||
val publishNoValidationTasks = project.tasks.filterIsInstance<PublishToMavenRepository>() | ||
.map { publishTask -> | ||
val newName = publishTask.name.replace("publish", "publishNoValidation") | ||
val newTask: PublishToBintrayRepository = | ||
project.tasks.create(newName, PublishToBintrayRepository::class.java) | ||
|
||
newTask.group = PublishingPlugin.PUBLISH_TASK_GROUP + " no validation" | ||
newTask.publication = publishTask.publication | ||
newTask.repository = publishTask.repository | ||
newTask.setDependsOn(publishTask.dependsOn) | ||
|
||
newTask | ||
} | ||
|
||
publishNoValidationTasks | ||
.groupBy { it.repository } | ||
.forEach { (repo, publishTasks) -> | ||
val repoName = repo.name.capitalize() | ||
project.tasks.create("publishNoValidationTo$repoName") { | ||
it.group = PublishingPlugin.PUBLISH_TASK_GROUP + " no validation" | ||
it.setDependsOn(publishTasks) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.