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

#295 publish plugin to gradle plugin portal #302

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,13 @@ root build.gradle
```groovy
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath "dev.icerock.moko.widgets:gradle-plugin:0.1.0"
}
}

allprojects {
repositories {
maven { url = uri("https://dl.bintray.com/icerockdev/plugins") } // compiler plugins
}
}
```

project build.gradle
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ buildscript {
jcenter()
}
dependencies {
classpath("dev.icerock.moko:resources-generator:0.16.1")
classpath("dev.icerock.moko:resources-generator:0.16.2")
classpath("dev.icerock.moko.widgets:gradle-plugin")
classpath("com.gradle.publish:plugin-publish-plugin:0.15.0")

classpath(":widgets-build-logic")
}
Expand Down
30 changes: 30 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

plugins {
id("org.jetbrains.kotlin.jvm") version ("1.5.20")
id("com.gradle.plugin-publish") version ("0.15.0")
id("detekt-convention")
id("publication-convention")
id("java-gradle-plugin")
}

buildscript {
Expand Down Expand Up @@ -39,3 +41,31 @@ publishing.publications.register("mavenJava", MavenPublication::class) {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
}

gradlePlugin {
plugins {
create("multiplatform-widgets-generator") {
id = "dev.icerock.mobile.multiplatform-widgets-generator"
implementationClass = "dev.icerock.moko.widgets.WidgetsGeneratorGradlePlugin"
}
}
}

pluginBundle {
website = "https://github.com/icerockdev/moko-widgets/tree/master/plugin"
vcsUrl = "https://github.com/icerockdev/moko-widgets/tree/master/plugin"
Comment on lines +55 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on root widgets repo

description = "Plugin to codegen for new Widgets"
tags = listOf("multiplatform-widgets-generator")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moko-widgets, moko, kotlin, kotlin-multiplatform


plugins {
getByName("multiplatform-widgets-generator") {
displayName = "Widgets Generator for IceRock projects"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MOKO Widgets generator plugin

}
}

mavenCoordinates {
groupId = project.group as String
artifactId = project.name
version = project.version as String
}
}