Skip to content

Commit 982e9ea

Browse files
Publishing to Gradle plugin portal
1 parent 5d41bfc commit 982e9ea

File tree

4 files changed

+81
-0
lines changed

4 files changed

+81
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
name: Release to Gradle plugin portal
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: typescript-generator version
9+
required: true
10+
type: string
11+
12+
jobs:
13+
release:
14+
runs-on: windows-latest
15+
steps:
16+
17+
- name: Checkout workflow
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Java
21+
uses: actions/setup-java@v3
22+
with:
23+
distribution: temurin
24+
java-version: 17
25+
26+
- name: Execute Gradle publish
27+
uses: gradle/gradle-build-action@v2
28+
with:
29+
gradle-version: 7.5.1
30+
build-root-directory: build\typescript-generator-gradle-plugin-publisher
31+
arguments: printVersion publishPlugins
32+
env:
33+
ORG_GRADLE_PROJECT_version: ${{ inputs.version }}
34+
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
35+
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ release.properties
1515
/sample-gradle-spring/.nb-gradle/
1616
/sample-gradle-spring/bin/
1717
/sample-gradle-spring/build/
18+
.gradle
1819
gradlew*
1920
gradle-wrapper*
2021

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
plugins {
3+
id 'com.gradle.plugin-publish' version '1.0.0'
4+
id 'java-library'
5+
}
6+
7+
group = 'cz.habarta.typescript-generator'
8+
9+
repositories {
10+
mavenCentral()
11+
mavenLocal()
12+
}
13+
14+
dependencies {
15+
api "cz.habarta.typescript-generator:typescript-generator-gradle-plugin:${version}"
16+
api "cz.habarta.typescript-generator:typescript-generator-spring:${version}"
17+
}
18+
19+
task printVersion {
20+
doLast {
21+
println "Releasing 'cz.habarta.typescript-generator' Gradle plugin version ${project.version}..."
22+
}
23+
}
24+
25+
pluginBundle {
26+
website = 'https://github.com/vojtechhabarta/typescript-generator'
27+
vcsUrl = 'https://github.com/vojtechhabarta/typescript-generator'
28+
tags = ['java', 'kotlin', 'json', 'typescript', 'typescript-generator', 'jackson', 'jakarta', 'rest', 'client', 'spring']
29+
}
30+
31+
gradlePlugin {
32+
plugins {
33+
typescriptGeneratorPlugin {
34+
id = 'cz.habarta.typescript-generator'
35+
displayName = 'Typescript-generator Gradle plugin'
36+
description = 'Generates TypeScript from Java - JSON declarations, REST service client'
37+
implementationClass = 'cz.habarta.typescript.generator.gradle.TypeScriptGeneratorPublishedPlugin'
38+
}
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
package cz.habarta.typescript.generator.gradle;
3+
4+
public class TypeScriptGeneratorPublishedPlugin extends TypeScriptGeneratorPlugin {
5+
}

0 commit comments

Comments
 (0)