Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Commit

Permalink
Change plugin name for republishing
Browse files Browse the repository at this point in the history
The plugin has to be recompiled for it to work with gradle 5.0+
  • Loading branch information
mampcs authored and gamma committed Oct 10, 2024
1 parent 2b80e7a commit 2653fcb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 85 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,10 @@ Wrangling your JS in a [Gradle](https://gradle.org) build is easy! Just add this
### Gradle 2.1+
```groovy
plugins {
id "com.eriwen.gradle.js" version "2.14.1"
id "com.cloudzilla.gradle.js" version "2.16.1"
}
```

### Gradle 2.0-
```groovy
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.eriwen:gradle-js-plugin:1.12.1"
}
}
apply plugin: "com.eriwen.gradle.js"
```


```groovy
// Declare your sources
Expand Down
89 changes: 22 additions & 67 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
plugins {
id 'com.gradle.build-scan' version '2.0.2'
id "com.gradle.plugin-publish" version "0.9.4"
id "com.gradle.plugin-publish" version "0.12.0"
id "java-gradle-plugin"
id "com.jfrog.bintray" version "1.6"
}
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
//apply plugin: 'signing'
apply plugin: 'jacoco'
apply plugin: 'project-report'

Expand All @@ -15,16 +15,11 @@ targetCompatibility = 1.6

defaultTasks 'clean', 'build'

version = '2.14.1'
group = 'com.eriwen'
version = '2.16.1'
group = 'com.cloudzilla.gradle'
ext.archivesBaseName = 'gradle-js-plugin'
ext.isSnapshot = version.endsWith("-SNAPSHOT")

buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}

repositories {
jcenter()
}
Expand Down Expand Up @@ -98,28 +93,34 @@ publishing {
}
}

gradlePlugin {
plugins {
jsPlugin {
id = 'com.cloudzilla.gradle.js'
implementationClass = 'com.eriwen.gradle.js.JsPlugin'
}
}
}


pluginBundle {
website = 'https://github.com/eriwen/gradle-js-plugin/'
vcsUrl = 'https://github.com/eriwen/gradle-js-plugin/'
website = 'https://github.com/mampcs/gradle-js-plugin/'
vcsUrl = 'https://github.com/mampcs/gradle-js-plugin/'
description = 'Gradle plugin for working with JS'
tags = ['javascript', 'jshint', 'requirejs']

plugins {
jsPlugin {
id = 'com.eriwen.gradle.js'
id = 'com.cloudzilla.gradle.js'
displayName = 'Gradle JavaScript Plugin'
}
}
mavenCoordinates {
groupId = 'com.eriwen'
groupId = 'com.cloudzilla.gradle'
artifactId = 'gradle-js-plugin'
}
}

signing {
sign configurations.archives
}

bintray {
user = System.properties['bintrayUsername']
key = System.properties['bintrayApiKey']
Expand All @@ -142,58 +143,12 @@ test {
}
}

jacoco {
toolVersion = "0.7.6.201602180812"
reportsDir = file("$buildDir/customJacocoReportDir")
}

jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}

jacocoTestCoverageVerification {
violationRules {
rule {
element = 'PACKAGE'
includes = ['com.eriwen.gradle.*']

limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.6
}
limit {
counter = 'CLASS'
value = 'MISSEDCOUNT'
maximum = 0
}
}
}
}

// Only *require* signing if we are uploading a non snapshot version
gradle.taskGraph.whenReady { taskGraph ->
tasks.withType(org.gradle.plugins.signing.Sign).all {
required = taskGraph.hasTask(":uploadArchives") && !isSnapshot
}
}

install.repositories.mavenInstaller {
pom.project(pomConfiguration)
if (signing.signatory) {
beforeDeployment { signing.signPom(it) }
}
}

uploadArchives {
repositories.mavenDeployer {
if (signing.signatory) {
beforeDeployment { signing.signPom(it) }
}
name = 'mavenCentralReleaseDeployer'
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: System.properties['mavenCentralUsername'], password: System.properties['mavenCentralPassword'])
Expand Down Expand Up @@ -228,9 +183,9 @@ def getPomConfiguration() {
}
}
scm {
connection 'scm:https://eriwen@github.com/eriwen/gradle-js-plugin'
developerConnection 'scm:[email protected]:eriwen/gradle-js-plugin.git'
url 'https://github.com/eriwen/gradle-js-plugin'
connection 'scm:https://mampcs@github.com/mampcs/gradle-js-plugin'
developerConnection 'scm:[email protected]:mampcs/gradle-js-plugin.git'
url 'https://github.com/mampcs/gradle-js-plugin'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
5 changes: 3 additions & 2 deletions src/main/groovy/com/eriwen/gradle/js/tasks/JsDocTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package com.eriwen.gradle.js.tasks

import com.eriwen.gradle.js.ResourceUtil
import com.eriwen.gradle.js.RhinoExec
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.SourceTask
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
Expand All @@ -28,8 +29,8 @@ class JsDocTask extends SourceTask {
private static final ResourceUtil RESOURCE_UTIL = new ResourceUtil()
private final RhinoExec rhino = new RhinoExec(project)

Iterable<String> modulePaths = ['lib', 'node_modules', 'rhino', '.']
Boolean debug = false
@Input Iterable<String> modulePaths = ['lib', 'node_modules', 'rhino', '.']
@Input Boolean debug = false

@OutputDirectory def destinationDir

Expand Down

0 comments on commit 2653fcb

Please sign in to comment.