Skip to content

Commit

Permalink
Initial setup based on gradle-plugin-bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfrench committed Jun 22, 2018
1 parent 0af7107 commit 72d2c74
Show file tree
Hide file tree
Showing 51 changed files with 2,479 additions and 0 deletions.
Binary file added .gradle/4.4/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/4.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/4.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/4.4/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file added .gradle/4.4/taskHistory/taskHistory.bin
Binary file not shown.
Binary file added .gradle/4.4/taskHistory/taskHistory.lock
Binary file not shown.
Binary file added .gradle/4.5.1/fileChanges/last-build.bin
Binary file not shown.
Binary file not shown.
Binary file added .gradle/4.5.1/fileContent/fileContent.lock
Binary file not shown.
Binary file added .gradle/4.5.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/4.5.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/4.5.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file added .gradle/4.5.1/taskHistory/taskHistory.bin
Binary file not shown.
Binary file added .gradle/4.5.1/taskHistory/taskHistory.lock
Binary file not shown.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
#Thu Jun 21 16:37:18 IST 2018
gradle.version=4.5.1
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Empty file.
11 changes: 11 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,139 changes: 1,139 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions build.gradle
@@ -0,0 +1,151 @@
// * * * * * * * * * * * *
// Plugins
// * * * * * * * * * * * *

plugins {
id 'groovy'
id 'java-gradle-plugin'

// Publishing publicly
id 'com.gradle.plugin-publish' version '0.9.10'

// Publishing to Artifactory
id 'maven-publish'
}

// * * * * * * * * * * * *
// Dependencies
// * * * * * * * * * * * *

repositories {
jcenter()
}

dependencies {
compile gradleApi()
compile group: 'com.squareup.okhttp', name: 'okhttp', version:'2.7.5'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.7'
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version:'2.14.0'
testCompile gradleTestKit()
testCompile 'junit:junit:4+'
testCompile group: 'io.swagger', name: 'swagger-parser', version:'1.0.34'

}

// * * * * * * * * * * * *
// Project configuration
// * * * * * * * * * * * *

project.description = 'Gradle Plugin for SwaggerHub'
project.group = 'io.github.jsfrench'
project.version = '1.0.0-SNAPSHOT'

project.ext.name = 'swaggerhub'
project.ext.pluginId = 'com.praqma.demo.DemoPlugin'
project.ext.scm = 'scm:git@github.com:jsfrench/swaggerhub-gradle-plugin.git'
project.ext.url = 'https://github.com/jsfrench/swaggerhub-gradle-plugin'

// Configuration for: java-gradle-plugin
gradlePlugin {
plugins {
demoPlugin {
id = project.pluginId
implementationClass = 'com.praqma.demo.DemoPlugin'
}
}
}

// Configuration for: java-gradle-plugin
//gradlePlugin {
// plugins {
// demoPlugin {
// id = project.pluginId
// implementationClass = 'io.github.jsfrench.swaggerhub.SwaggerHubPlugin'
// }
// }
//}

// * * * * * * * * * * * *
// Publishing
// * * * * * * * * * * * *

// Consult the accompanied blog post for information on publishing the plugin.
// https://www.praqma.com/stories/gradle-plugin-bootstrap/

// Publishing to plugins.gradle.org
// --------------------------------

// Configuration for: com.gradle.plugin-publish
pluginBundle {
website = project.url
vcsUrl = project.scm
tags = ['demo', 'example', 'quickstart']

plugins {
demoPlugin {
displayName = 'Demo Custom Gradle Plugin '
description = project.description
id = project.pluginId
}
}
}

// Publishing to Artifactory
// -------------------------

// Configures the publication to push, and the repository to push to
publishing {
publications {
pluginPublication (MavenPublication) {
from components.java
groupId project.group
artifactId project.name
version project.version
}
}
repositories {
maven {
url project.rtfUrl
credentials {
username project.rtfUser
password project.rtfSecret
}
}
}
}


// ##### ORIGINAL #######
//apply plugin: 'idea'
//apply plugin: 'java'
//apply plugin: 'maven-publish'
//apply plugin: 'io.swagger.swaggerhub.plugin.SwaggerHubPlugin'
//
//group = 'io.github.jsfrench'
//version = '1.0.0-SNAPSHOT'

//description = """SwaggerHub Gradle Plugin"""

//sourceCompatibility = 1.8
//targetCompatibility = 1.8
//tasks.withType(JavaCompile) {
// options.encoding = 'UTF-8'
//}
//
//configurations.all {
//}
//repositories {
// mavenCentral()
//}



//// https://docs.gradle.org/current/userguide/java_gradle_plugin.html#plugins-tutorials
//gradlePlugin {
// plugins {
// simplePlugin {
// id = 'org.gradle.sample.simple-plugin'
// implementationClass = 'org.gradle.sample.SimplePlugin'
// }
// }
//}
@@ -0,0 +1 @@
implementation-class=com.praqma.demo.DemoPlugin
15 changes: 15 additions & 0 deletions build/publications/demoPluginPluginMarkerMaven/pom-default.xml
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.praqma.demo.DemoPlugin</groupId>
<artifactId>com.praqma.demo.DemoPlugin.gradle.plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>io.github.jsfrench</groupId>
<artifactId>demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
22 changes: 22 additions & 0 deletions build/publications/pluginMaven/pom-default.xml
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.jsfrench</groupId>
<artifactId>demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>2.7.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
22 changes: 22 additions & 0 deletions build/publications/pluginPublication/pom-default.xml
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.jsfrench</groupId>
<artifactId>demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>2.7.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1 @@
implementation-class=com.praqma.demo.DemoPlugin
@@ -0,0 +1 @@
implementation-class=io.github.jsfrench.swaggerhub.SwaggerHubUpload
2 changes: 2 additions & 0 deletions build/tmp/jar/MANIFEST.MF
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

10 changes: 10 additions & 0 deletions gradle.properties
@@ -0,0 +1,10 @@
# Artifactory server and repository
# ---------------------------------
rtfUrl=http\://devops.acmeindustries.com\:8080/artifactory/plugins-release

# Artifactory credential placeholders
# -----------------------------------
# Please do not store credentials in the version controlled build.gradle file
# Inject them as environment variables or add them in your user Gradle properties (~/.gradle/gradle.properties)
rtfUser=
rtfSecret=
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
#Thu Jun 21 16:50:21 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 72d2c74

Please sign in to comment.