Skip to content

Commit

Permalink
Publish the Gradle plugin to the Gradle Plugin Portal (Fixes #45)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebourg committed Aug 9, 2023
1 parent e0e611a commit b4b6cb3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 50 deletions.
16 changes: 4 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,10 @@ <h3 id="gradle">Gradle plugin</h3>
<p>With the Groovy syntax:</p>

<pre class="prettyprint lang-groovy">
buildscript {
dependencies {
classpath 'net.jsign:jsign-gradle-plugin:5.0'
}
plugins {
id 'net.jsign' version '5.0'
}

apply plugin: 'net.jsign'

task sign {
doLast {
jsign(file : 'application.exe',
Expand All @@ -394,14 +390,10 @@ <h3 id="gradle">Gradle plugin</h3>
<p>With the Kotlin syntax:</p>

<pre class="prettyprint lang-kotlin">
buildscript {
dependencies {
classpath("net.jsign:jsign-gradle-plugin:5.0")
}
plugins {
id("net.jsign") version "5.0"
}

apply(plugin = "net.jsign")

task("sign") {
doLast {
val jsign = project.extensions.getByName("jsign") as groovy.lang.Closure<*>
Expand Down
8 changes: 8 additions & 0 deletions jsign-gradle-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Jsign Gradle Plugin
-------------------

Deployment procedure:
* Publish the new version of jsign-core to Maven Central
* Add the API key from https://plugins.gradle.org in `~/.gradle/gradle.properties`
* Update the version in `build.gradle`
* Run: `gradle publishPlugins`
71 changes: 33 additions & 38 deletions jsign-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
}
}

apply plugin: "java"
apply plugin: "com.gradle.plugin-publish"

repositories {
mavenLocal()
}

dependencies {
compile gradleApi()
compile 'net.jsign:jsign-core:2.0'
}

pluginBundle {
website = 'https://ebourg.github.io/jsign/'
vcsUrl = 'https://github.com/ebourg/jsign'

description = 'Code signing for Windows executables, Microsoft Installers, Cabinet files, Windows packages and scripts'

plugins {
jsignPlugin {
id = 'net.jsign'
displayName = 'Gradle Jsign plugin'
tags = ['signing']
version = '2.0'
}
}
}
plugins {
id 'java'
id 'com.gradle.plugin-publish' version '1.2.0'
}

group = 'net.jsign'
version = '5.0'

repositories {
mavenCentral()
}

dependencies {
implementation gradleApi()
implementation "net.jsign:jsign-core:$version"
}

tasks.withType(Copy).all { duplicatesStrategy 'exclude' }

gradlePlugin {
website = 'https://ebourg.github.io/jsign/'
vcsUrl = 'https://github.com/ebourg/jsign'

plugins {
jsignPlugin {
id = 'net.jsign'
displayName = 'Jsign Gradle plugin'
description = 'Sign and timestamp Windows executable files, Microsoft Installers (MSI), Cabinet files (CAB), Catalog files (CAT), Windows packages (APPX/MSIX) or scripts (PowerShell, VBScript, JScript, WSF)'
tags.set(['signing', 'code-signing', 'authenticode', 'signtool'])
implementationClass = 'net.jsign.JsignGradlePlugin'
}
}
}

0 comments on commit b4b6cb3

Please sign in to comment.