@@ -11,8 +11,7 @@ import sbt.nio.Keys.*
11
11
import complete .DefaultParsers ._
12
12
import pl .project13 .scala .sbt .JmhPlugin
13
13
import pl .project13 .scala .sbt .JmhPlugin .JmhKeys .Jmh
14
- import com .gradle .develocity .agent .sbt .DevelocityPlugin .autoImport ._
15
- import com .gradle .develocity .agent .sbt .api .experimental .buildcache
14
+ import sbt .CustomDevelocityPlugin .autoImport ._
16
15
import com .typesafe .sbt .packager .Keys ._
17
16
import com .typesafe .sbt .packager .MappingsHelper .directory
18
17
import com .typesafe .sbt .packager .universal .UniversalPlugin
@@ -281,8 +280,6 @@ object Build {
281
280
282
281
val fetchScalaJSSource = taskKey[File ](" Fetch the sources of Scala.js" )
283
282
284
- val extraDevelocityCacheInputFiles = taskKey[Seq [Path ]](" Extra input files for caching" )
285
-
286
283
lazy val SourceDeps = config(" sourcedeps" )
287
284
288
285
// Settings shared by the build (scoped in ThisBuild). Used in build.sbt
@@ -318,56 +315,6 @@ object Build {
318
315
319
316
// enable verbose exception messages for JUnit
320
317
(Test / testOptions) += Tests .Argument (TestFrameworks .JUnit , " -a" , " -v" , " -s" ),
321
-
322
- // Configuration to publish build scans to develocity.scala-lang.org
323
- develocityConfiguration := {
324
- val isInsideCI = insideCI.value
325
- val config = develocityConfiguration.value
326
- val buildScan = config.buildScan
327
- val buildCache = config.buildCache
328
- // disable test retry on compilation test classes
329
- val noRetryTestClasses = Set (
330
- " dotty.tools.dotc.BestEffortOptionsTests" ,
331
- " dotty.tools.dotc.CompilationTests" ,
332
- " dotty.tools.dotc.FromTastyTests" ,
333
- " dotty.tools.dotc.IdempotencyTests" ,
334
- " dotty.tools.dotc.ScalaJSCompilationTests" ,
335
- " dotty.tools.dotc.TastyBootstrapTests" ,
336
- " dotty.tools.dotc.coverage.CoverageTests" ,
337
- " dotty.tools.dotc.transform.PatmatExhaustivityTest" ,
338
- " dotty.tools.repl.ScriptedTests"
339
- )
340
- config
341
- .withProjectId(ProjectId (" scala3" ))
342
- .withServer(config.server.withUrl(Some (url(" https://develocity.scala-lang.org" ))))
343
- .withBuildScan(
344
- buildScan
345
- .withPublishing(Publishing .onlyIf(_.authenticated))
346
- .withBackgroundUpload(! isInsideCI)
347
- .withTag(if (isInsideCI) " CI" else " Local" )
348
- .withLinks(buildScan.links ++ GithubEnv .develocityLinks)
349
- .withValues(buildScan.values ++ GithubEnv .develocityValues)
350
- .withObfuscation(buildScan.obfuscation.withIpAddresses(_.map(_ => " 0.0.0.0" )))
351
- )
352
- .withBuildCache(
353
- buildCache
354
- .withLocal(buildCache.local.withEnabled(true ).withStoreEnabled(true ))
355
- .withRemote(buildCache.remote.withEnabled(true ).withStoreEnabled(isInsideCI))
356
- .withRequireClean(! isInsideCI)
357
- )
358
- .withTestRetry(
359
- config.testRetry
360
- .withFlakyTestPolicy(FlakyTestPolicy .Fail )
361
- .withMaxRetries(if (isInsideCI) 1 else 0 )
362
- .withMaxFailures(10 )
363
- .withClassesFilter((className, _) => ! noRetryTestClasses.contains(className))
364
- )
365
- },
366
- // Deactivate Develocity's test caching because it caches all tests or nothing.
367
- // Also at the moment, it does not take compilation files as inputs.
368
- Test / develocityBuildCacheClient := None ,
369
- extraDevelocityCacheInputFiles := Seq .empty,
370
- extraDevelocityCacheInputFiles / outputFileStamper := FileStamper .Hash ,
371
318
)
372
319
373
320
// Settings shared globally (scoped in Global). Used in build.sbt
@@ -449,16 +396,6 @@ object Build {
449
396
Package .ManifestAttributes (
450
397
" Automatic-Module-Name" -> s " ${dottyOrganization.replaceAll(" -" ," ." )}. ${moduleName.value.replaceAll(" -" ," ." )}"
451
398
),
452
-
453
- // add extraDevelocityCacheInputFiles in cache key components
454
- Compile / compile / buildcache.develocityTaskCacheKeyComponents +=
455
- (Compile / extraDevelocityCacheInputFiles / outputFileStamps).taskValue,
456
- Test / test / buildcache.develocityTaskCacheKeyComponents +=
457
- (Test / extraDevelocityCacheInputFiles / outputFileStamps).taskValue,
458
- Test / testOnly / buildcache.develocityInputTaskCacheKeyComponents +=
459
- (Test / extraDevelocityCacheInputFiles / outputFileStamps).taskValue,
460
- Test / testQuick / buildcache.develocityInputTaskCacheKeyComponents +=
461
- (Test / extraDevelocityCacheInputFiles / outputFileStamps).taskValue
462
399
)
463
400
464
401
// Settings used for projects compiled only with Java
0 commit comments