Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rewrite plugin for v2 #144

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ tab_width = 4
[*.md]
max_line_length = 80

[{*.bash,*.sh,*.zsh}]
indent_size = 2

[{*.yaml,*.yml}]
indent_size = 2

[*.{kt,kts}]
ktlint_standard_filename = disabled
ktlint_standard_annotation = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_value-argument-comment = disabled
ktlint_standard_value-parameter-comment = disabled
2 changes: 1 addition & 1 deletion .github/workflows/autolabeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PR Autolabeler

on:
pull_request:
types: [opened, edited, reopened, synchronize]
types: [ opened, edited, reopened, synchronize ]
branches-ignore:
- 'renovate/**'

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
run: |
./gradlew \
-Psemver.modifier=${{ github.event.inputs.version-modifier }} \
build ${{ steps.build_parameters.outputs.publishCommand }} \
build \
${{ steps.build_parameters.outputs.publishCommand }} \
${{ steps.build_parameters.outputs.githubReleaseCommand }} \
-Psigning.keyId=${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} \
-Psigning.password=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Docs
on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Set cache id
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- name: Configure Cache
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-

- name: Install pipx
run: python -m pip install --upgrade pipx

- name: Install mkdocs
run: pipx install mkdocs-material --include-deps

- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
102 changes: 13 additions & 89 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,100 +1,24 @@
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/

# File-based project format
*.iws

# IntelliJ
*.iml
*.ipr
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

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

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

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

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### macOS template
# General
.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
**/.gradle/**
**/build/**

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

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

# Log file
*.log

# BlueJ files
*.ctxt

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

# Package Files #
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.log
*.nar
*.rar
*.tar.gz
*.war
*.zip

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
.DS_Store
.gradletasknamecache
.idea/**
hs_err_pid*
replay_pid*
.kotlin/
27 changes: 7 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,21 @@
# Contributing

👋 Thanks for wanting to contribute!
We are always looking for bug fixes, changes, and new features.
If you'd like to work on something please consider making an issue to help track what is being worked on, but someone from the Figure team will be around to help review code and approve pull requests!
👋 Thanks for wanting to contribute!
We are always looking for bug fixes, changes, and new features.
If you'd like to work on something please consider making an issue to help track what is being worked on, but someone
from the Figure team will be around to help review code and approve pull requests!

## Working Locally

To build locally:

```
./gradlew clean build
./gradlew build
```

To publish locally we recommend commenting out the `signing` plugin, located in the `build-logic/build-conventions/src/main/kotlin/local.publishing.gradle.kts`.
This stops the signing from happening on a publish locally so you don't need to mess around with keys.
Then you can run:

```
./gradlew publishToMavenLocal
```

## Tests

Currently we don't have a lot of tests, but we do have one set up that uses the `GradleRunner` to create a gradle environment just for the test that we can then apply our code to and run tasks.
Check out the `BuildLogicFunctionalSpec` to see how this works.

## Licensing

One thing we need to ensure is that we maintain a license header on each source file.
We have automated this through the use of a gradle plugin!
Whenever a `.gradlew build` is run, the license headers will automatically be regenerated. Please make sure to commit these updates.

More info about this plugin is available on github: https://github.com/CadixDev/licenser
Whenever a `./gradlew build` is run, the license headers will automatically be regenerated. Please make sure to commit
these updates.
4 changes: 0 additions & 4 deletions HEADER.txt

This file was deleted.

Loading
Loading