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

Add upgrade-assistant support #1

Merged
merged 23 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1260d29
Add upgrade-assistant support
bryceatmoderne Sep 19, 2024
f7c9c24
Update gradle/licenseHeader.txt
bryceatmoderne Sep 20, 2024
0e2fe6a
Update gradle wrapper version
bryceatmoderne Sep 20, 2024
4121c6a
Merge branch 'upgrade-assistant-support' of github.com:openrewrite/re…
bryceatmoderne Sep 20, 2024
099ce3a
Merge branch 'main' into upgrade-assistant-support
timtebeek Sep 20, 2024
cef7dee
Record file errors. Only run upgrade-assistant for first recipe cycle.
bryceatmoderne Sep 23, 2024
030e951
Merge branch 'upgrade-assistant-support' of github.com:openrewrite/re…
bryceatmoderne Sep 23, 2024
47b3745
Update src/test/java/org/openrewrite/dotnet/UpgradeAssistantTest.java
bryceatmoderne Sep 23, 2024
62dbb4e
Fix code smells
bryceatmoderne Sep 23, 2024
18547a1
Merge branch 'upgrade-assistant-support' of github.com:openrewrite/re…
bryceatmoderne Sep 23, 2024
6c41f2f
Apply suggestions from code review
timtebeek Sep 23, 2024
0b572f1
Add category.yml
bryceatmoderne Sep 23, 2024
00d11cc
Merge branch 'upgrade-assistant-support' of github.com:openrewrite/re…
bryceatmoderne Sep 23, 2024
99f3b9d
Add UpgradeApplicationAnalysis recipe
bryceatmoderne Sep 24, 2024
34cc6c7
Update src/main/java/org/openrewrite/dotnet/UpgradeAssistantAnalysis.…
bryceatmoderne Sep 24, 2024
53d480a
Update src/test/java/org/openrewrite/dotnet/UpgradeAssistantAnalyzeTe…
bryceatmoderne Sep 24, 2024
738532e
Update src/main/java/org/openrewrite/dotnet/UpgradeAssistant.java
bryceatmoderne Sep 24, 2024
b8a40db
Update src/main/java/org/openrewrite/dotnet/UpgradeAssistantRecipe.java
bryceatmoderne Sep 24, 2024
e84e5c4
Apply suggestions from code review
timtebeek Sep 24, 2024
59bb066
Fix unit test
bryceatmoderne Sep 24, 2024
325e601
Minimize test indentation
timtebeek Sep 25, 2024
45f4749
Add dotnet.yml recipes. Add test verifying behaviour when invalid tar…
bryceatmoderne Sep 25, 2024
68baf10
Address merge conflicts
bryceatmoderne Sep 25, 2024
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: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: ci

on:
push:
branches:
- main
tags-ignore:
- "*"
pull_request:
branches:
- main
workflow_dispatch: {}
schedule:
- cron: 0 17 * * *

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main
secrets:
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
ossrh_token: ${{ secrets.OSSRH_TOKEN }}
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: publish

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+

concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
uses: openrewrite/gh-automation/.github/workflows/publish-gradle.yml@main
secrets:
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
ossrh_token: ${{ secrets.OSSRH_TOKEN }}
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
17 changes: 17 additions & 0 deletions .github/workflows/receive-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: receive-pr

on:
pull_request:
types: [opened, synchronize]
branches:
- main

concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true

# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# Since this pull request receives untrusted code, we should **NOT** have any secrets in the environment.
jobs:
upload-patch:
uses: openrewrite/gh-automation/.github/workflows/receive-pr.yml@main
18 changes: 18 additions & 0 deletions .github/workflows/repository-backup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: repository-backup
on:
workflow_dispatch: {}
schedule:
- cron: 0 17 * * *

concurrency:
group: backup-${{ github.ref }}
cancel-in-progress: false

jobs:
repository-backup:
uses: openrewrite/gh-automation/.github/workflows/repository-backup.yml@main
secrets:
bucket_mirror_target: ${{ secrets.S3_GITHUB_REPOSITORY_BACKUPS_BUCKET_NAME }}
bucket_access_key_id: ${{ secrets.S3_GITHUB_REPOSITORY_BACKUPS_ACCESS_KEY_ID }}
bucket_secret_access_key: ${{ secrets.S3_GITHUB_REPOSITORY_BACKUPS_SECRET_ACCESS_KEY }}
30 changes: 26 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
# BlueJ files
*.ctxt

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

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand All @@ -22,3 +18,29 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

.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

.idea/
out/
src/main/generated/
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# rewrite-dotnet
OpenRewrite recipes based on .NET tools
![Logo](https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss.png)
### OpenRewrite recipes based on .NET tools.

[![ci](https://github.com/openrewrite/rewrite-dotnet/actions/workflows/ci.yml/badge.svg)](https://github.com/openrewrite/rewrite-dotnet/actions/workflows/ci.yml)
[![Apache 2.0](https://img.shields.io/github/license/openrewrite/rewrite-dotnet.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/org.openrewrite.recipe/rewrite-dotnet.svg)](https://mvnrepository.com/artifact/org.openrewrite.recipe/rewrite-dotnet)
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.openrewrite.org/scans)

### What is this?

This project implements a [Rewrite module](https://github.com/openrewrite/rewrite) that migrates projects using .NET tools.

Browse [a selection of recipes available through this module in the recipe catalog](https://docs.openrewrite.org/recipes/dotnet).

## Contributing

We appreciate all types of contributions. See the [contributing guide](https://github.com/openrewrite/.github/blob/main/CONTRIBUTING.md) for detailed instructions on how to get started.
15 changes: 15 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugins {
id("org.openrewrite.build.recipe-library") version "latest.release"
}

group = "org.openrewrite.recipe"
description = "OpenRewrite recipes based on .NET tools"

val rewriteVersion = rewriteRecipe.rewriteVersion.get()
dependencies {
implementation(platform("org.openrewrite:rewrite-bom:$rewriteVersion"))

implementation("org.openrewrite:rewrite-core")

testImplementation("org.openrewrite:rewrite-test")
}
13 changes: 13 additions & 0 deletions gradle/licenseHeader.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright ${year} the original author or authors.
<p>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<p>
https://www.apache.org/licenses/LICENSE-2.0
<p>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading