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

バージョン 35 リリース #1414

Merged
merged 107 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
b05d9ac
[Add] 毎月21日はいずれの整地ワールドでも整地量を1.75倍にする
Lucky3028 Jul 23, 2021
4e58cf6
Merge branch 'develop' into feature/#1106
Lucky3028 Jul 23, 2021
dc8c563
レビュー受けた修正
Lucky3028 Jul 23, 2021
47dc3f8
[Fix] LocalDateのimport元のパスが間違っていたので修正
Lucky3028 Jul 23, 2021
37b618f
[Fix] レビューを受けた修正
Lucky3028 Jul 23, 2021
15ce77b
apply review
KisaragiEffective Jul 23, 2021
b72e199
[fix] compile error
KisaragiEffective Aug 9, 2021
9c25787
Merge branch 'develop' into Lucky3028/feature/1106
KisaragiEffective Aug 25, 2021
0099720
[update] apply review
KisaragiEffective Sep 29, 2021
7a685ec
[update] `Functor[F]#map`を`F[A]#map`にする
KisaragiEffective Nov 24, 2021
2dc21ee
[update] close #1157
KisaragiEffective Oct 22, 2021
4dfdf18
[fix] どこでもエンダーチェストを開くのに必要な整地レベルは25だったので合わせる
KisaragiEffective Oct 23, 2021
4f21f87
[fix] type error
KisaragiEffective Oct 23, 2021
2ac8f2a
[update] どこでもエンダーチェストに関することをsubsystemとして分離し、ビジネスロジックと関心事をより疎結合にする
KisaragiEffective Nov 23, 2021
9ee1cd2
[update] どこでもエンダーチェストに関することをsubsystemとして分離し、ビジネスロジックと関心事をより疎結合にする
KisaragiEffective Nov 23, 2021
0b5d401
[fix] compile error
KisaragiEffective Nov 24, 2021
4e181b4
[update] minimumLevelの文脈がIO固定になっているのを修正
KisaragiEffective Nov 24, 2021
5d6f014
[update] use flatMap instead of unsafeRunSync
KisaragiEffective Nov 25, 2021
f87790d
[update] openEnderChestOrNotifyInsufficientLevel
KisaragiEffective Nov 25, 2021
7f16ccd
[update] openEnderChestOrNotifyInsufficientLevelがplayerを受け取っているのを修正
KisaragiEffective Nov 25, 2021
ec54257
[update] 嘘情報と冗長な変数を削除
KisaragiEffective Nov 25, 2021
8cecb60
[update] 冗長な変数を削除し、意図を明確にするために型注釈をつける
KisaragiEffective Nov 25, 2021
bcb95e4
[update] configから最小レベルを受け取るようにする
KisaragiEffective Nov 25, 2021
a964fa0
[update] /ec の登録をサブシステムに移譲する
KisaragiEffective Nov 25, 2021
2580550
[update] apply review: everywhere -> anywhere
KisaragiEffective Nov 25, 2021
ec859d3
[fix] compile error
KisaragiEffective Nov 25, 2021
619d89f
[fix] illegal early reference
KisaragiEffective Nov 25, 2021
9600f14
[update] apply review (partial)
KisaragiEffective Dec 5, 2021
229ed8d
feat: anywhereenderに必要な概念を追加
kory33 Feb 26, 2022
901c3b5
refactor: FirstPageでの場合分けなどをすべてanywhereenderに判断させるように
kory33 Feb 26, 2022
ed8451b
refactor: minimumLevel をAPIから削除
kory33 Feb 26, 2022
6003518
refactor: anywhereenderのConfigが渡されるようにする
kory33 Feb 26, 2022
9105dec
refactor: anywhereEnderSystemをprivateに
kory33 Feb 26, 2022
8925e9b
refactor: rename CanAccessEverywhereEnderChest -> AnywhereEnderAccess…
kory33 Feb 26, 2022
d5bd07e
refactor: fix name typo
kory33 Feb 26, 2022
7023927
Merge pull request #1215 from GiganticMinecraft/feature/1157.enderchest
kory33 Feb 26, 2022
0df0158
feat: semanticdbを有効化する
kory33 Feb 26, 2022
73f60ed
feat: scalafixを導入する
kory33 Feb 26, 2022
b361de6
chore: .gitignoreを更新
kory33 Feb 26, 2022
e0bd27d
Merge pull request #1390 from GiganticMinecraft/introduce-scalafix
kory33 Feb 26, 2022
414e774
chore: scalafix RemoveUnusedで不要なimportをすべて削除する
kory33 Feb 26, 2022
585c626
chore: scalafix RemoveUnusedで不要な変数宣言を削除する
kory33 Feb 26, 2022
09b159d
Merge pull request #1396 from GiganticMinecraft/remove-unused
kory33 Feb 26, 2022
5587dfc
chore(ci): scalafixのRemoveUnused ruleをCIで強制するようにする
kory33 Feb 26, 2022
3473a1c
Merge pull request #1398 from GiganticMinecraft/enforce-scalafix-rules
kory33 Feb 26, 2022
54ca37c
fix: 整地ワールドであるかどうかでフラグを参照するかどうかの設定が抜けていたので修正
Lucky3028 Jan 22, 2022
606ebd5
docs: add docs about BreakUtil#multiplyBreakValidlyEnabled
Lucky3028 Jan 22, 2022
09ad837
docs: 細かな日本語上の表現を修正
Lucky3028 Jan 22, 2022
9d2e528
docs: 細かな日本語上の表現を修正
Lucky3028 Jan 22, 2022
b6e9362
docs: 細かな日本語上の表現を追加
Lucky3028 Jan 22, 2022
849bb97
docs: 細かな日本語上の表現を修正
Lucky3028 Jan 22, 2022
039a32e
docs: 細かな日本語上の表現を修正
Lucky3028 Jan 22, 2022
cc38cca
docs: apply review for style
Lucky3028 Jan 22, 2022
ce4c67a
fix: 変数名に関するレビューを受けて修正
Lucky3028 Feb 12, 2022
adaa50f
refactor: 様々をrenameする
kory33 Feb 27, 2022
df217ca
Merge pull request #1327 from Lucky3028/fix/#1325
kory33 Feb 27, 2022
248a361
[update] close #1197
KisaragiEffective Oct 17, 2021
19cba9d
feat!: recordsWithPositionsがタイを考慮するようにする
kory33 Feb 27, 2022
3d3c1b7
refactor: 「1個上のレコードを取得」などのロジックをRanking側に押しやる
kory33 Feb 27, 2022
6039241
fix: パターンマッチを直す
kory33 Feb 27, 2022
6e4c757
Merge pull request #1205 from GiganticMinecraft/feature/1197
kory33 Feb 27, 2022
681967a
fix(newyear): アイテムの配布処理を作動するようにする
Lucky3028 Feb 27, 2022
9ebf335
docs: add docs to DateTimeDuration
Lucky3028 Feb 27, 2022
3b1a30d
fix: 年越しそばの配布はlastquitに依存しているので、サーバー再起動を考慮する
Lucky3028 Feb 27, 2022
291c082
fix: DISTRIBUTED_SOBA_DATE -> NEW_YEAR_EVE.from
Lucky3028 Feb 27, 2022
a6429d7
fix: remove ungiven players for valentine 2022
Lucky3028 Feb 27, 2022
dd32fe3
fix: remove /event valentine
Lucky3028 Feb 27, 2022
3abb22c
test: add test for DateTimeDuration
Lucky3028 Feb 27, 2022
9b8fab2
docs: コメントを少しわかりやすく
Lucky3028 Feb 27, 2022
6434061
docs: コメントの文法的な修正
Lucky3028 Feb 27, 2022
d487f90
refactor: DateTimeDuration#isInDuration -> contains
Lucky3028 Feb 27, 2022
fc371fa
refactor: DateTimeDuration#isBeforeDuration -> isEntirelyAfter
Lucky3028 Feb 27, 2022
63347c0
docs: コメントの不要な文言を削除
Lucky3028 Feb 27, 2022
85c2fec
test: DateTimeDuration#containsと#isEntirelyAfterについてテストを追加
Lucky3028 Feb 27, 2022
63de6e4
test: shouldの次に来るのはBehaveWord
Lucky3028 Feb 27, 2022
6c272f1
Merge pull request #1116 from Lucky3028/feature/#1106
kory33 Feb 27, 2022
fb0161b
docs(test): レビューを受け英文を修正
Lucky3028 Feb 27, 2022
942b932
docs(test): レビューを受け英文を修正
Lucky3028 Feb 27, 2022
1c5786b
chore: scalafix
kory33 Feb 27, 2022
f7d3f42
Merge pull request #1401 from GiganticMinecraft/scalafix-all
kory33 Feb 27, 2022
f0567d1
test: レビューを受けて修正
Lucky3028 Feb 27, 2022
4fb7e5e
test: レビューを受けて修正
Lucky3028 Feb 27, 2022
0b19454
chore: scalafix
kory33 Feb 27, 2022
125c552
Merge pull request #1402 from GiganticMinecraft/scalafix-all
kory33 Feb 27, 2022
0f68d29
fix: レビューを受けて修正
Lucky3028 Feb 28, 2022
767eaf1
Merge pull request #1400 from Lucky3028/fix/#1369
kory33 Feb 28, 2022
657fbcd
chore(build): scalafmtを導入
kory33 Feb 28, 2022
226aad9
chore(ci): scalafmtをCIで強制する
kory33 Feb 28, 2022
01d5ce3
Merge pull request #1406 from GiganticMinecraft/enforce-scalafmt
kory33 Feb 28, 2022
4757a4c
docs: build.sbtにコメント等を追加し、整理する
kory33 Feb 28, 2022
c4a64c9
Merge pull request #1407 from GiganticMinecraft/document-build-sbt
kory33 Feb 28, 2022
3411b42
chore: scalafmtAll
kory33 Feb 28, 2022
91f5a4e
chore: scalafmtAll (IDEAがOptimize importsしてた)
kory33 Feb 28, 2022
fdd279a
Merge pull request #1408 from GiganticMinecraft/scalafmt-all
kory33 Feb 28, 2022
e5a5bdb
build: scalafixのルールを追加
kory33 Feb 28, 2022
dd869b3
Merge pull request #1409 from GiganticMinecraft/add-scalafix-rules
kory33 Feb 28, 2022
4fd5811
build: logLevelをCIビルドでのみDebugにするように
kory33 Feb 28, 2022
c318cb3
Merge pull request #1410 from GiganticMinecraft/loglevel-is-debug-onl…
kory33 Feb 28, 2022
a087903
fix: /vote がプレーヤー向けのコマンドとして定義されていたのを修正
kory33 Feb 28, 2022
b80ea20
refactor: executionFがEffectのみを要求するようにする
kory33 Feb 28, 2022
5e12994
feat: executionCSEffect を実装
kory33 Feb 28, 2022
d13ee02
refactor: VoteCommandの実装を大幅に簡潔に
kory33 Feb 28, 2022
9348ba8
Merge pull request #1411 from GiganticMinecraft/fix-vote-command
kory33 Feb 28, 2022
a2f6e79
chore: move project name definition
Lucky3028 Mar 1, 2022
2cbb4cc
Merge pull request #1413 from GiganticMinecraft/Lucky3028-patch-1
kory33 Mar 1, 2022
96e1230
[bump] 34 -> 35
github-actions[bot] Mar 3, 2022
6736d7e
Merge remote-tracking branch 'origin/master' into develop
github-actions[bot] Mar 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

jobs:
build_test_and_upload:
env:
BUILD_ENVIRONMENT_IS_CI_OR_LOCAL: "CI"
runs-on: ubuntu-20.04
container: ghcr.io/giganticminecraft/seichiassist-builder:1a64049
steps:
Expand Down Expand Up @@ -79,6 +81,12 @@ jobs:
touch -t "$timestamp" $proto
done

- name: Check format with Scalafmt
run: sbt scalafmtCheckAll

- name: Check lint with Scalafix
run: sbt "scalafix --check"

- name: Test and build artifact
run: sbt assembly

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/project/target
/project/project
/target
.bsp/

# Local files
deployLocal.sh
Expand Down
8 changes: 8 additions & 0 deletions .scalafix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rules = [
NoAutoTupling,
RemoveUnused,
DisableSyntax,
LeakingImplicitClassVal,
NoValInForComprehension,
ProcedureSyntax,
]
29 changes: 29 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version = 3.4.3
preset=IntelliJ
runner.dialect = scala213

maxColumn = 96

includeNoParensInSelectChains = true

optIn {
breakChainOnFirstMethodDot = false
forceBlankLineBeforeDocstring = true
}

newlines {
beforeCurlyLambdaParams = multilineWithCaseOnly
afterCurlyLambda = squash
implicitParamListModifierPrefer = before
sometimesBeforeColonInMethodReturnType = true
}

assumeStandardLibraryStripMargin = true
align.stripMargin = true

docstrings {
style = Asterisk
oneline = unfold
}

trailingCommas = never
122 changes: 82 additions & 40 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,45 @@ import sbt.Keys.baseDirectory

import java.io._

// region 全プロジェクト共通のメタデータ

ThisBuild / scalaVersion := "2.13.1"
// ThisBuild / version はGitHub Actionsによって自動更新される
// ThisBuild / version はGitHub Actionsによって取得/自動更新される
// 次の行は ThisBuild / version := "(\d*)" の形式でなければならない。
ThisBuild / version := "34"
ThisBuild / version := "35"
ThisBuild / organization := "click.seichi"
ThisBuild / description := "ギガンティック☆整地鯖の独自要素を司るプラグイン"

// Scalafixが要求するため、semanticdbは有効化する
ThisBuild / semanticdbEnabled := true

// endregion

// region 雑多な設定

// kind-projector 構文を使いたいため
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full)

// Scalafixがsemanticdbを必要とするため
ThisBuild / semanticdbEnabled := true

// CIビルドで詳細なログを確認するため
ThisBuild / logLevel := {
if (scala.sys.env.get("BUILD_ENVIRONMENT_IS_CI_OR_LOCAL").contains("CI")) {
Level.Debug
} else {
Level.Info
}
}

// テストが落ちた時にスタックとレースを表示するため。
// ScalaTest のオプションは https://www.scalatest.org/user_guide/using_the_runner を参照のこと。
Compile / testOptions += Tests.Argument("-oS")

// endregion

// region 依存関係

resolvers ++= Seq(
"jitpack.io" at "https://jitpack.io",
"maven.sk89q.com" at "https://maven.sk89q.com/repo/",
Expand Down Expand Up @@ -75,28 +107,31 @@ val dependenciesToEmbed = Seq(
"com.beachape" %% "enumeratum" % "1.5.13",

// protobuf
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion,
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion
)

addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full)
// endregion

// region assemblyで含む依存関係の処理

// localDependenciesはprovidedとして扱い、jarに埋め込まない
assembly / assemblyExcludedJars := {
(assembly / fullClasspath).value
.filter { a =>
def directoryContainsFile(directory: File, file: File) =
file.absolutePath.startsWith(directory.absolutePath)
(assembly / fullClasspath).value.filter { a =>
def directoryContainsFile(directory: File, file: File) =
file.absolutePath.startsWith(directory.absolutePath)

directoryContainsFile(baseDirectory.value / "localDependencies", a.data)
}
directoryContainsFile(baseDirectory.value / "localDependencies", a.data)
}
}

val tokenReplacementMap = settingKey[Map[String, String]]("Map specifying what tokens should be replaced to")
// endregion

tokenReplacementMap := Map(
"name" -> name.value,
"version" -> version.value
)
// region プラグインJarに埋め込むリソースの処理

val tokenReplacementMap =
settingKey[Map[String, String]]("Map specifying what tokens should be replaced to")

tokenReplacementMap := Map("name" -> name.value, "version" -> version.value)

val filesToBeReplacedInResourceFolder = Seq("plugin.yml")

Expand All @@ -106,7 +141,8 @@ Compile / filteredResourceGenerator :=
filterResources(
filesToBeReplacedInResourceFolder,
tokenReplacementMap.value,
(Compile / resourceManaged).value, (Compile / resourceDirectory).value
(Compile / resourceManaged).value,
(Compile / resourceDirectory).value
)

Compile / resourceGenerators += (Compile / filteredResourceGenerator)
Expand All @@ -115,33 +151,39 @@ Compile / unmanagedResources += baseDirectory.value / "LICENSE"

// トークン置換を行ったファイルをunmanagedResourcesのコピーから除外する
unmanagedResources / excludeFilter :=
filesToBeReplacedInResourceFolder.foldLeft((unmanagedResources / excludeFilter).value)(_.||(_))
filesToBeReplacedInResourceFolder.foldLeft((unmanagedResources / excludeFilter).value)(
_.||(_)
)

// endregion

logLevel := Level.Debug
// region ScalaPBの設定

// ScalaPBの設定
Compile / PB.protoSources := Seq(baseDirectory.value / "protocol")
Compile / PB.targets := Seq(scalapb.gen() -> (Compile / sourceManaged).value / "scalapb")

Compile / testOptions += Tests.Argument("-oS")
// endregion

// region 各プロジェクトの設定

lazy val root = (project in file(".")).settings(
name := "SeichiAssist",
assembly / assemblyOutputPath := baseDirectory.value / "target" / "build" / s"SeichiAssist.jar",
libraryDependencies := providedDependencies ++ testDependencies ++ dependenciesToEmbed,
excludeDependencies := Seq(ExclusionRule(organization = "org.bukkit", name = "bukkit")),
unmanagedBase := baseDirectory.value / "localDependencies",
scalacOptions ++= Seq(
"-encoding",
"utf8",
"-unchecked",
"-language:higherKinds",
"-deprecation",
"-Ypatmat-exhaust-depth",
"320",
"-Ymacro-annotations",
"-Ywarn-unused"
),
javacOptions ++= Seq("-encoding", "utf8")
)

lazy val root = (project in file("."))
.settings(
name := "SeichiAssist",
assembly / assemblyOutputPath := baseDirectory.value / "target" / "build" / s"SeichiAssist.jar",
libraryDependencies := providedDependencies ++ testDependencies ++ dependenciesToEmbed,
excludeDependencies := Seq(
ExclusionRule(organization = "org.bukkit", name = "bukkit")
),
unmanagedBase := baseDirectory.value / "localDependencies",
scalacOptions ++= Seq(
"-encoding", "utf8",
"-unchecked",
"-language:higherKinds",
"-deprecation",
"-Ypatmat-exhaust-depth", "320",
"-Ymacro-annotations",
"-Ywarn-unused",
),
javacOptions ++= Seq("-encoding", "utf8")
)
// endregion
7 changes: 7 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
// プラグインJarを(依存関係にあるJarをすべて同梱して)出力するため
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")

// Lintを掛けるため
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34")

// コードフォーマットするため
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
6 changes: 5 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ commands:
usage: /<command>
permission-message: *denied
permission: seichiassist.hat
ec:
description: エンダーチェストを開く
usage: /<command>
permission: seichiassist.ec
permission-message: *denied
minestack:
description: Toggle whether minestack collects applicable item automatically
usage: /minestack <on | off>
Expand Down Expand Up @@ -148,7 +153,6 @@ permissions:
- seichiassist.fd
- seichiassist.present.*
- seichiassist.hat
- seichiassist.minestack
seichiassist.event:
default: op
seichiassist.shareinv:
Expand Down
Loading