forked from openrewrite/rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix all source file line endings (openrewrite#1726)
- Loading branch information
1 parent
e891977
commit 8cb8036
Showing
156 changed files
with
19,330 additions
and
19,276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
* text eol=lf | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# https://github.com/Danimoth/gitattributes | ||
|
||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf | ||
|
||
# These files are text and should be normalized (Convert crlf => lf) | ||
*.bash text eol=lf | ||
*.css text diff=css | ||
*.htm text diff=html | ||
*.html text diff=html | ||
*.java text diff=java | ||
*.sh text eol=lf | ||
|
||
|
||
# These files are binary and should be left untouched | ||
# (binary is a macro for -text -diff) | ||
*.a binary | ||
*.lib binary | ||
*.icns binary | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.mov binary | ||
*.mp4 binary | ||
*.mp3 binary | ||
*.flv binary | ||
*.fla binary | ||
*.swf binary | ||
*.gz binary | ||
*.zip binary | ||
*.jar binary | ||
*.tar binary | ||
*.tar.gz binary | ||
*.7z binary | ||
*.ttf binary | ||
*.pyc binary | ||
*.gpg binary | ||
*.bin binary | ||
*.exe binary | ||
*.dll binary | ||
*.so binary | ||
*.dylib binary | ||
*.class binary | ||
*.jar binary | ||
*.war binary | ||
*.ear binary | ||
*.rar binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
# Building & Developing OpenRewrite | ||
|
||
We use [Gradle](https://gradle.org/) to build this project. | ||
The gradle wrapper checked into this project defines the gradle version to use. | ||
When building from the command line invoke the wrapper with `./gradlew build` on unix-style terminals and `gradlew build` on windows-style terminals. | ||
|
||
NOTE: windows-style users should ensure that they configure `core.autocrlf = false` as Rewrite requires unix-style line endings. This can be done at clone time by using `git clone -c core.autocrlf=false https://github.com/openrewrite/rewrite.git`. | ||
|
||
### CLI Environment Configuration: | ||
|
||
* [JDK](https://adoptopenjdk.net/) version: 11 | ||
* JDK language & bytecode level: 1.8 | ||
* [Gradle](https://gradle.org/) version: Defined in wrapper | ||
* [Kotlin](https://kotlinlang.org/) version: 1.5 | ||
* Kotlin language level: 1.5 | ||
* Kotlin JVM bytecode level: 1.8 | ||
|
||
### IDE Configuration | ||
|
||
We use [IntelliJ IDEA](https://www.jetbrains.com/idea/) to develop this project. | ||
Other IDEs or versions of this IDE can be made to work. | ||
These are one set of versions we know works: | ||
|
||
* IDEA version: 2021.1.3 | ||
|
||
You must set the `-parameters` compiler flag to run Rewrite tests. | ||
If your system does not have UTF-8 as its default character encoding (e.g., Windows) you must also add `-encoding utf8`. | ||
Add these to the "additional command line parameters" field in IntelliJ -> Preferences -> Build, Execution, Deployment -> Compiler -> Java Compiler. | ||
# Building & Developing OpenRewrite | ||
|
||
We use [Gradle](https://gradle.org/) to build this project. | ||
The gradle wrapper checked into this project defines the gradle version to use. | ||
When building from the command line invoke the wrapper with `./gradlew build` on unix-style terminals and `gradlew build` on windows-style terminals. | ||
|
||
NOTE: windows-style users should ensure that they configure `core.autocrlf = false` as Rewrite requires unix-style line endings. This can be done at clone time by using `git clone -c core.autocrlf=false https://github.com/openrewrite/rewrite.git`. | ||
|
||
### CLI Environment Configuration: | ||
|
||
* [JDK](https://adoptopenjdk.net/) version: 11 | ||
* JDK language & bytecode level: 1.8 | ||
* [Gradle](https://gradle.org/) version: Defined in wrapper | ||
* [Kotlin](https://kotlinlang.org/) version: 1.5 | ||
* Kotlin language level: 1.5 | ||
* Kotlin JVM bytecode level: 1.8 | ||
|
||
### IDE Configuration | ||
|
||
We use [IntelliJ IDEA](https://www.jetbrains.com/idea/) to develop this project. | ||
Other IDEs or versions of this IDE can be made to work. | ||
These are one set of versions we know works: | ||
|
||
* IDEA version: 2021.1.3 | ||
|
||
You must set the `-parameters` compiler flag to run Rewrite tests. | ||
If your system does not have UTF-8 as its default character encoding (e.g., Windows) you must also add `-encoding utf8`. | ||
Add these to the "additional command line parameters" field in IntelliJ -> Preferences -> Build, Execution, Deployment -> Compiler -> Java Compiler. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation("org.gradle:test-retry-gradle-plugin:1.2.1") | ||
implementation("com.gradle.enterprise:test-distribution-gradle-plugin:2.3") | ||
implementation("com.gradle:gradle-enterprise-gradle-plugin:3.10") | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21") | ||
implementation("org.owasp:dependency-check-gradle:7.0.4.1") | ||
implementation("gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1") | ||
implementation("com.github.jk1:gradle-license-report:2.0") | ||
implementation("com.netflix.nebula:gradle-contacts-plugin:6.0.0") | ||
implementation("com.netflix.nebula:gradle-info-plugin:11.3.3") | ||
implementation("com.netflix.nebula:nebula-release-plugin:16.0.0") | ||
implementation("com.netflix.nebula:nebula-publishing-plugin:18.4.0") | ||
implementation("com.netflix.nebula:nebula-project-plugin:9.6.3") | ||
implementation("io.github.gradle-nexus:publish-plugin:1.0.0") | ||
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2") | ||
implementation("org.openrewrite:plugin:latest.release") | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(11)) | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain { | ||
this as JavaToolchainSpec | ||
languageVersion.set(JavaLanguageVersion.of("11")) | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
tasks.named<Test>("test").configure { | ||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 | ||
useJUnitPlatform() | ||
jvmArgs = listOf( | ||
"-XX:+UnlockDiagnosticVMOptions", | ||
"-XX:+ShowHiddenFrames" | ||
) | ||
testLogging { | ||
showExceptions = true | ||
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL | ||
showCauses = true | ||
showStackTraces = true | ||
} | ||
} | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation("org.gradle:test-retry-gradle-plugin:1.2.1") | ||
implementation("com.gradle.enterprise:test-distribution-gradle-plugin:2.3") | ||
implementation("com.gradle:gradle-enterprise-gradle-plugin:3.10") | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21") | ||
implementation("org.owasp:dependency-check-gradle:7.0.4.1") | ||
implementation("gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1") | ||
implementation("com.github.jk1:gradle-license-report:2.0") | ||
implementation("com.netflix.nebula:gradle-contacts-plugin:6.0.0") | ||
implementation("com.netflix.nebula:gradle-info-plugin:11.3.3") | ||
implementation("com.netflix.nebula:nebula-release-plugin:16.0.0") | ||
implementation("com.netflix.nebula:nebula-publishing-plugin:18.4.0") | ||
implementation("com.netflix.nebula:nebula-project-plugin:9.6.3") | ||
implementation("io.github.gradle-nexus:publish-plugin:1.0.0") | ||
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2") | ||
implementation("org.openrewrite:plugin:latest.release") | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(11)) | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain { | ||
this as JavaToolchainSpec | ||
languageVersion.set(JavaLanguageVersion.of("11")) | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
tasks.named<Test>("test").configure { | ||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 | ||
useJUnitPlatform() | ||
jvmArgs = listOf( | ||
"-XX:+UnlockDiagnosticVMOptions", | ||
"-XX:+ShowHiddenFrames" | ||
) | ||
testLogging { | ||
showExceptions = true | ||
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL | ||
showCauses = true | ||
showStackTraces = true | ||
} | ||
} |
60 changes: 30 additions & 30 deletions
60
build-src/src/main/kotlin/org.openrewrite.base.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import nebula.plugin.contacts.Contact | ||
import nebula.plugin.contacts.ContactsExtension | ||
|
||
plugins { | ||
base | ||
id("org.openrewrite.license") | ||
id("org.openrewrite.dependency-check") | ||
id("nebula.contacts") | ||
id("nebula.info") | ||
} | ||
|
||
group = "org.openrewrite" | ||
description = "Eliminate tech-debt. Automatically." | ||
|
||
repositories { | ||
if (!project.hasProperty("releasing")) { | ||
mavenLocal() | ||
maven { | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots/") | ||
} | ||
} | ||
mavenCentral() | ||
} | ||
|
||
configure<ContactsExtension> { | ||
val j = Contact("[email protected]") | ||
j.moniker("Moderne") | ||
|
||
people["[email protected]"] = j | ||
} | ||
import nebula.plugin.contacts.Contact | ||
import nebula.plugin.contacts.ContactsExtension | ||
|
||
plugins { | ||
base | ||
id("org.openrewrite.license") | ||
id("org.openrewrite.dependency-check") | ||
id("nebula.contacts") | ||
id("nebula.info") | ||
} | ||
|
||
group = "org.openrewrite" | ||
description = "Eliminate tech-debt. Automatically." | ||
|
||
repositories { | ||
if (!project.hasProperty("releasing")) { | ||
mavenLocal() | ||
maven { | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots/") | ||
} | ||
} | ||
mavenCentral() | ||
} | ||
|
||
configure<ContactsExtension> { | ||
val j = Contact("[email protected]") | ||
j.moniker("Moderne") | ||
|
||
people["[email protected]"] = j | ||
} |
48 changes: 24 additions & 24 deletions
48
build-src/src/main/kotlin/org.openrewrite.dependency-check.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
plugins { | ||
id("org.owasp.dependencycheck") | ||
} | ||
|
||
configure<org.owasp.dependencycheck.gradle.extension.DependencyCheckExtension> { | ||
analyzers.assemblyEnabled = false | ||
failBuildOnCVSS = 9.0F | ||
scanProjects = listOf("rewrite-core", | ||
"rewrite-gradle", | ||
"rewrite-groovy", | ||
"rewrite-hcl", | ||
"rewrite-java", | ||
"rewrite-java-8", | ||
"rewrite-java-11", | ||
"rewrite-json", | ||
"rewrite-maven", | ||
"rewrite-properties", | ||
"rewrite-protobuf", | ||
"rewrite-xml", | ||
"rewrite-yaml", | ||
"rewrite-test", | ||
"rewrite-bom", | ||
"rewrite-benchmarks") | ||
} | ||
plugins { | ||
id("org.owasp.dependencycheck") | ||
} | ||
|
||
configure<org.owasp.dependencycheck.gradle.extension.DependencyCheckExtension> { | ||
analyzers.assemblyEnabled = false | ||
failBuildOnCVSS = 9.0F | ||
scanProjects = listOf("rewrite-core", | ||
"rewrite-gradle", | ||
"rewrite-groovy", | ||
"rewrite-hcl", | ||
"rewrite-java", | ||
"rewrite-java-8", | ||
"rewrite-java-11", | ||
"rewrite-json", | ||
"rewrite-maven", | ||
"rewrite-properties", | ||
"rewrite-protobuf", | ||
"rewrite-xml", | ||
"rewrite-yaml", | ||
"rewrite-test", | ||
"rewrite-bom", | ||
"rewrite-benchmarks") | ||
} |
Oops, something went wrong.