11lazy val commonSettings = Seq (
22 organization := " nl.codestar" ,
33 homepage := Some (url(" https://github.com/code-star/sbt-azure-functions-plugin" )),
4- // version is set by sbt-dynver plugin (included through sbt-ci-assembly )
4+ // version is set by sbt-dynver plugin (included through sbt-ci-release )
55 description := " SBT Plugin to generate function.json artefacts needed to publish code as an Azure Function" ,
6+ organization := " nl.codestar" ,
7+ organizationName := " Codestar powered by Sopra Steria" ,
8+ organizationHomepage := Some (url(" https://codestar.nl" )),
9+ homepage := Some (url(" https://codestar.nl/sbt-azure-functions-plugin" )),
610 licenses += (" MIT" , url(" https://opensource.org/licenses/MIT" )),
711 developers := List (
812 Developer (
913 " jeanmarc" ,
1014 " Jean-Marc van Leerdam" ,
11- " jean-marc.van.leerdam@ordina.nl" ,
12- url(" https://github.com/jeanmarc" )
15+ " jean-marc.vanleerdam@soprasteria.com" ,
16+ url(" https://soprasteria.com" )
17+ )
18+ ),
19+ scmInfo := Some (
20+ ScmInfo (
21+ url(" https://github.com/code-star/sbt-azure-functions-plugin" )," scm:git@github.com:code-star/sbt-azure-functions-plugin.git" )
22+ ),
23+ credentials ++= Seq (
24+ Credentials (
25+ " GnuPG Key ID" ,
26+ " gpg" ,
27+ System .getenv(" PGP_KEYID" ), // key identifier
28+ " ignored" // this field is ignored; passwords are supplied by pinentry
29+ ),
30+ Credentials (
31+ " Sonatype Nexus Repository Manager" ,
32+ " oss.sonatype.org" ,
33+ System .getenv(" SONATYPE_USER" ),
34+ System .getenv(" SONATYPE_PASSWORD" ) // Use environment variable for security
35+ ),
36+ Credentials (
37+ " Sonatype Nexus Repository Manager" ,
38+ " central.sonatype.com" ,
39+ System .getenv(" SONATYPE_USER" ),
40+ System .getenv(" SONATYPE_PASSWORD" ) // Use environment variable for security
41+ ),
42+ Credentials (
43+ " central-snapshots" ,
44+ " central.sonatype.com" ,
45+ System .getenv(" SONATYPE_USER" ),
46+ System .getenv(" SONATYPE_PASSWORD" ) // Use environment variable for security
1347 )
1448 )
49+
1550)
1651
17- lazy val root = ( project in file(" ." ))
52+ lazy val root = project.in( file(" ." ))
1853 .aggregate(plugin)
1954 .settings(
2055 name := " sbt-azure-functions-plugin" ,
2156 commonSettings,
2257 // the root project should not produce any artifacts
2358 publishArtifact := false ,
24- publish := {}
59+ publish := {},
60+ sonaDeploymentName := {
61+ val o = organization.value
62+ val n = " sbt-azure-functions"
63+ val v = version.value
64+ val dt = java.time.LocalDateTime .now.format(java.time.format.DateTimeFormatter .ofPattern(" yyyyMMdd_HHmmss" ))
65+ s " $o: $n: $v: $dt"
66+ },
2567 )
2668
27- lazy val plugin = ( project in file(" plugin" ))
69+ lazy val plugin = project.in( file(" plugin" ))
2870 .enablePlugins(SbtPlugin )
2971 .settings(
3072 name := " sbt-azure-functions" ,
3173 commonSettings,
74+
75+ scalaVersion := " 2.12.18" ,
76+ pluginCrossBuild / sbtVersion := {
77+ scalaBinaryVersion.value match {
78+ case " 2.12" => " 1.11.4" // set minimum version
79+ }
80+ },
3281 scalacOptions ++= Seq (
3382 " -encoding" ,
3483 " UTF8" ,
@@ -41,22 +90,31 @@ lazy val plugin = (project in file("plugin"))
4190 " -Ywarn-adapted-args"
4291 ),
4392 libraryDependencies ++= Seq (
44- " com.fasterxml.jackson.core" % " jackson-databind" % " 2.12.0 " ,
45- " com.microsoft.azure" % " azure-tools-common" % " 0.10 .0" ,
46- " com.typesafe.scala-logging" %% " scala-logging" % " 3.9.2 " ,
47- " com.microsoft.azure.functions" % " azure-functions-java-library" % " 1. 3.1" % " test" ,
48- " org.scalatest" %% " scalatest" % " 3.2.2 " % " test" ,
93+ " com.fasterxml.jackson.core" % " jackson-databind" % " 2.19.2 " ,
94+ " com.microsoft.azure" % " azure-tools-common" % " 0.14 .0" ,
95+ " com.typesafe.scala-logging" %% " scala-logging" % " 3.9.5 " ,
96+ " com.microsoft.azure.functions" % " azure-functions-java-library" % " 3.1.0 " % " test" ,
97+ " org.scalatest" %% " scalatest" % " 3.2.19 " % " test" ,
4998 " org.scala-sbt" %% " scripted-plugin" % sbtVersion.value
5099 ),
51- addSbtPlugin(" com.eed3si9n" % " sbt-assembly" % " 0.14.10 " ),
100+ addSbtPlugin(" com.eed3si9n" % " sbt-assembly" % " 2.3.1 " ),
52101 scriptedLaunchOpts := {
53102 scriptedLaunchOpts.value ++
54103 Seq (" -Xmx1024M" , " -Dplugin.version=" + version.value)
55104 },
56105 scriptedBufferLog := false ,
57- logBuffered in Test := false ,
58- publishArtifact in Test := false
106+ Test / logBuffered := false ,
107+ Test / publishArtifact := false
59108 )
60109
61110// workaround for interactive sessions that do not echo the user input (https://github.com/sbt/sbt-bintray/issues/177)
62111ThisBuild / useSuperShell := false
112+
113+ ThisBuild / pomIncludeRepository := { _ => false }
114+ ThisBuild / publishMavenStyle := true
115+
116+ ThisBuild / publishTo := {
117+ val centralSnapshots = " https://central.sonatype.com/repository/maven-snapshots/"
118+ if (isSnapshot.value) Some (" central-snapshots" at centralSnapshots)
119+ else localStaging.value
120+ }
0 commit comments