Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cleanup the build, removed Asciidoclet, switched layout #21

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*.java]
end_of_line = lf
indent_style = tab
indent_size = 4
14 changes: 14 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version = 2.7.4

align = none
align.openParenCallSite = false

assumeStandardLibraryStripMargin = true

continuationIndent.callSite = 2
continuationIndent.defnSite = 4

docstrings = JavaDoc

maxColumn = 120

40 changes: 5 additions & 35 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import mill.scalalib.publish._
import de.tobiasroeser.mill.osgi._
import de.tobiasroeser.mill.vcs.version.VcsVersion

object main
extends MavenModule
with PublishModule
with OsgiBundleModule {
object main extends RootModule with JavaModule with PublishModule with OsgiBundleModule {

override def publishVersion = VcsVersion.vcsState().format()

Expand All @@ -35,8 +32,9 @@ object main
override def artifactName = "domino-java"
override def bundleSymbolicName = "domino.java"

override def osgiHeaders = T {
super.osgiHeaders().copy(
override def osgiHeaders = super
.osgiHeaders()
.copy(
`Import-Package` = Seq(
"""org.slf4j.*;version="[1.7,3)";resolution:=optional""",
"de.tototec.utils.functional.*;resolution:=optional",
Expand All @@ -47,9 +45,6 @@ object main
s"""domino.java.capsule"""
)
)
}

override def millSourcePath = super.millSourcePath / os.up

override def pomSettings: mill.T[mill.scalalib.publish.PomSettings] = T {
PomSettings(
Expand All @@ -61,7 +56,6 @@ object main
developers = Seq(
Developer(id = "lefou", name = "Tobias Roeser", url = "https://github.com/lefou")
)

)
}

Expand All @@ -80,36 +74,13 @@ object main

override def javadocOptions: T[Seq[String]] = super.javadocOptions() ++ Seq("-Xdoclint:none")

// def docletIvyDeps = T {
// Agg(
// Deps.asciiDoclet
// )
// }

// def docletClasspath = T {
// resolveDeps(docletIvyDeps)
// }

override def generatedSources = T {
val dest = T.ctx().dest
Seq("README.adoc", "LICENSE.txt").foreach(f => os.copy.into(millSourcePath / f, dest))
Seq(PathRef(dest))
}

// override def javadocOptions = Seq(
// "-doclet", "org.asciidoctor.Asciidoclet",
// "-docletpath", s"${docletClasspath().map(_.path).mkString(File.pathSeparator)}",
// "-overview", s"${millSourcePath / "README.adoc"}",
// "--base-dir", s"${millSourcePath}",
// "--attributes-file", s"${millSourcePath / 'src / 'main / 'doc / "placeholders.adoc"}",
// "--attribute", s"name=${artifactName}",
// "--attribute", s"version=${publishVersion}",
// "--attribute", s"dominojavaversion=${publishVersion}",
// "--attribute", s"title-link=${url}[${bundleSymbolicName} ${publishVersion}]",
// "--attribute", "env-asciidoclet=true"
// )

object test extends MavenModuleTests with TestModule.Junit4 {
object test extends JavaModuleTests with TestModule.Junit4 {
override def ivyDeps = T {
super.ivyDeps() ++ Agg(
Deps.lambdaTest,
Expand All @@ -123,4 +94,3 @@ object main
}

}

File renamed without changes.
1 change: 0 additions & 1 deletion src/main/doc/placeholders.adoc

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Activator extends OsgiContext {
public Activator() {
whenBundleActive(bc -> {
providesService(exampleService, MyService.class,
Util.asMap("prop1", "value1", "prop2", 3));
Util.asMap("prop1", "value1", "prop2", 3));
});
}
}
Expand All @@ -83,7 +83,7 @@ public Activator() {
expectEquals(ref.getProperty("prop2"), 3);
expectEquals(sr.getServiceReference(MyService2.class.getName()), null);
expectNotEquals(sr.getServiceReferences(MyService.class.getName(), "(&(prop1=value1)(prop2=3))"),
null);
null);

activator.stop(sr.getBundleContext());
expectEquals(sr.getServiceReference(MyService.class.getName()), null);
Expand Down