-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dev, CI, release mode functionality to the plugin
- Loading branch information
1 parent
5d5688f
commit 43eab02
Showing
13 changed files
with
961 additions
and
300 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,7 @@ | ||
rules = [ | ||
OrganizeImports | ||
] | ||
|
||
OrganizeImports { | ||
preset = INTELLIJ_2020_3 | ||
} |
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,13 @@ | ||
version = 3.4.3 | ||
|
||
runner.dialect = scala212 | ||
|
||
preset = defaultWithAlign | ||
|
||
maxColumn = 100 | ||
|
||
indent { | ||
callSite = 2 | ||
defnSite = 2 | ||
extendSite = 2 | ||
} |
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
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
23 changes: 23 additions & 0 deletions
23
src/main/scala/io/github/davidgregory084/OptionsMode.scala
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,23 @@ | ||
/* | ||
* Copyright 2022 David Gregory | ||
* | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* 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. | ||
*/ | ||
|
||
package io.github.davidgregory084 | ||
|
||
sealed abstract class OptionsMode extends Product with Serializable | ||
|
||
case object DevMode extends OptionsMode | ||
case object CiMode extends OptionsMode | ||
case object ReleaseMode extends OptionsMode |
38 changes: 38 additions & 0 deletions
38
src/main/scala/io/github/davidgregory084/ScalaVersion.scala
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,38 @@ | ||
/* | ||
* Copyright 2022 David Gregory | ||
* | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* 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. | ||
*/ | ||
|
||
package io.github.davidgregory084 | ||
|
||
import scala.Ordering.Implicits._ | ||
|
||
case class ScalaVersion(major: Long, minor: Long, patch: Long) { | ||
def isBetween(addedVersion: ScalaVersion, removedVersion: ScalaVersion) = | ||
this >= addedVersion && this < removedVersion | ||
} | ||
|
||
object ScalaVersion { | ||
val V2_11_0 = ScalaVersion(2, 11, 0) | ||
val V2_12_0 = ScalaVersion(2, 12, 0) | ||
val V2_13_0 = ScalaVersion(2, 13, 0) | ||
val V2_13_3 = ScalaVersion(2, 13, 3) | ||
val V2_13_4 = ScalaVersion(2, 13, 4) | ||
val V2_13_5 = ScalaVersion(2, 13, 5) | ||
val V2_13_6 = ScalaVersion(2, 13, 6) | ||
val V3_0_0 = ScalaVersion(3, 0, 0) | ||
|
||
implicit val scalaVersionOrdering: Ordering[ScalaVersion] = | ||
Ordering.by(version => (version.major, version.minor, version.patch)) | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/scala/io/github/davidgregory084/ScalacOption.scala
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,22 @@ | ||
/* | ||
* Copyright 2022 David Gregory | ||
* | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* 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. | ||
*/ | ||
|
||
package io.github.davidgregory084 | ||
|
||
case class ScalacOption( | ||
tokens: List[String], | ||
isSupported: ScalaVersion => Boolean = _ => true | ||
) |
Oops, something went wrong.