Skip to content

Commit

Permalink
[gradle-plugin] Initial implementation (#162)
Browse files Browse the repository at this point in the history
* [gradle-plugin] Initial commit

* Clarify comments on file constraints

When a user sets the models, apis, or supportingFiles environment
variables, any one of these being set disables generation for the other
two.  This could be confusing to users, so I've added some clarification
text in the comments for these properties.

In addition, I've cleaned up the extension on
Property.ifNotEmpty, to avoid using Suppress annotations where it's not
necessary. The change creates a local variable of type T?, allowing
Kotlin to track the variable's nullable state at compile time.

* Move gradle plugin under modules

* Move kt files under kotlin source set. Add sample.

* [gradle] map-like options as maps

* Add tests for gradle validate task

* Apply gradle plugin to mvn install phase

* [gradle] Testing remaining gradle tasks

* Add gradle plugin to the integration doc

* Update gradle plugin README with task options

* Gradle readme formatting
  • Loading branch information
jimschubert authored and wing328 committed May 31, 2018
1 parent 7dfd940 commit b6b8c0d
Show file tree
Hide file tree
Showing 33 changed files with 3,130 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/integration.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
## Workflow Integration (Maven, Github, CI/CD)

### Gradle Integration

See the [openapi-generator-gradle-plugin README](../modules/openapi-generator-gradle-plugin/README.adoc) for details related to configuring and using the Gradle Plugin.

Supported tasks include:

* Listing generators
* Validation of Open API 2.0 and 3.0 Specs
* Generating "Meta" generators
* Generating all generators supported by OpenAPI Generator

### Maven Integration

You can use the [openapi-generator-maven-plugin](../modules/openapi-generator-maven-plugin/README.md) for integrating with your workflow, and generating any codegen target.
See the [openapi-generator-maven-plugin README](../modules/openapi-generator-maven-plugin/README.md) for details related to configuring and using the Maven Plugin.

### GitHub Integration

Expand Down
152 changes: 152 additions & 0 deletions modules/openapi-generator-gradle-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@

# Created by https://www.gitignore.io/api/gradle,kotlin,intellij,linux,osx

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Ruby plugin and RubyMine
/.rakeTasks

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

### Kotlin ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Gradle ###
.gradle
**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties


# End of https://www.gitignore.io/api/gradle,kotlin,intellij,linux,osx
Loading

0 comments on commit b6b8c0d

Please sign in to comment.