Add Reflections
This commit is contained in:
parent
860dd66431
commit
5146fdf368
4 changed files with 21 additions and 11 deletions
|
@ -42,21 +42,14 @@ assemblyMergeStrategy in assembly := {
|
|||
case x => (assemblyMergeStrategy in assembly).value(x)
|
||||
}
|
||||
|
||||
lazy val commenter = project.settings(Seq(
|
||||
name := "Chroma-Commenter",
|
||||
version := "1.0",
|
||||
organization := "com.github.TBMCPlugins"
|
||||
))
|
||||
|
||||
val teszt = TaskKey[Unit]("teszt")
|
||||
teszt := {
|
||||
//val tv = target.value
|
||||
val sv = (Compile / sources).value
|
||||
for (file <- sv) {
|
||||
Using(Source.fromFile(file)) { src =>
|
||||
for (line <- src.getLines) {
|
||||
if (line.contains("class"))
|
||||
println(line)
|
||||
println(line + "")
|
||||
}
|
||||
}.recover[Unit]({ case t => t.printStackTrace() })
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class Commenter {
|
||||
|
||||
}
|
10
project/build.sbt
Normal file
10
project/build.sbt
Normal file
|
@ -0,0 +1,10 @@
|
|||
lazy val commenter = project.settings(Seq(
|
||||
name := "Chroma-Commenter",
|
||||
version := "1.0",
|
||||
organization := "com.github.TBMCPlugins",
|
||||
|
||||
resolvers += Resolver.mavenLocal,
|
||||
|
||||
libraryDependencies += "org.reflections" % "reflections" % "0.9.12",
|
||||
libraryDependencies += "com.github.TBMCPlugins.ChromaCore" % "ButtonProcessor" % "master-SNAPSHOT"
|
||||
))
|
10
project/commenter/src/main/scala/Commenter.scala
Normal file
10
project/commenter/src/main/scala/Commenter.scala
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
|
||||
object Commenter extends App {
|
||||
val ref = new Reflections("buttondevteam.discordplugin")
|
||||
val types: Set[Class[_]] = ref.getTypesAnnotatedWith(HasConfig, true).asScala
|
||||
for (ty <- types) {
|
||||
ty
|
||||
.
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue