Skip to content

Commit a20f710

Browse files
authored
Merge pull request scalacenter#1951 from scalacenter/byeGradle
refactor: migrate Gradle integration out of Bloop
2 parents 5bb37c7 + edf85f5 commit a20f710

File tree

19 files changed

+15
-5541
lines changed

19 files changed

+15
-5541
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jobs:
3737
- name: Tests
3838
run: |
3939
./bin/sbt-ci.sh \
40-
"gradleBloop211/compile" \
41-
"gradleBloop212/compile" \
42-
"gradleBloop212/test" \
4340
"sbtBloop10/publishLocal" \
4441
"sbtBloop10/scripted"
4542
shell: bash

build.sbt

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -520,75 +520,6 @@ lazy val sbtBloop10: Project = project
520520
libraryDependencies += Dependencies.bloopConfig
521521
)
522522

523-
lazy val gradleBloop211 = project
524-
.in(file("integrations") / "gradle-bloop")
525-
.enablePlugins(BuildInfoPlugin)
526-
.disablePlugins(ScriptedPlugin, ScalafixPlugin)
527-
.settings(
528-
name := "gradle-bloop",
529-
BuildDefaults.gradlePluginBuildSettings,
530-
BuildInfoPlugin.buildInfoScopedSettings(Test),
531-
scalaVersion := Dependencies.Scala211Version,
532-
libraryDependencies ++= Seq(
533-
Dependencies.classgraph % Test,
534-
Dependencies.bloopConfig
535-
),
536-
target := (file(
537-
"integrations"
538-
) / "gradle-bloop" / "target" / "gradle-bloop-2.11").getAbsoluteFile,
539-
Test / sourceDirectories := Nil,
540-
Test / bloopGenerate := None,
541-
Test / compile / skip := true,
542-
Test / test / skip := true
543-
)
544-
.dependsOn(integrationUtils211 % "test->compile")
545-
546-
lazy val gradleBloop212 = project
547-
.in(file("integrations") / "gradle-bloop")
548-
.enablePlugins(BuildInfoPlugin)
549-
.disablePlugins(ScriptedPlugin)
550-
.dependsOn(frontend % "test->test", integrationUtils212 % "test->compile")
551-
.settings(
552-
name := "gradle-bloop",
553-
scalafixSettings,
554-
BuildDefaults.gradlePluginBuildSettings,
555-
testSettings,
556-
BuildInfoPlugin.buildInfoScopedSettings(Test),
557-
scalaVersion := Dependencies.Scala212Version,
558-
target := (file(
559-
"integrations"
560-
) / "gradle-bloop" / "target" / "gradle-bloop-2.12").getAbsoluteFile,
561-
libraryDependencies ++= Seq(
562-
Dependencies.classgraph % Test,
563-
Dependencies.bloopConfig
564-
)
565-
)
566-
567-
lazy val gradleBloop213 = project
568-
.in(file("integrations") / "gradle-bloop")
569-
.enablePlugins(BuildInfoPlugin)
570-
.disablePlugins(ScriptedPlugin)
571-
.settings(
572-
name := "gradle-bloop",
573-
scalafixSettings,
574-
BuildDefaults.gradlePluginBuildSettings,
575-
testSettings,
576-
BuildInfoPlugin.buildInfoScopedSettings(Test),
577-
scalaVersion := Dependencies.Scala213Version,
578-
target := (file(
579-
"integrations"
580-
) / "gradle-bloop" / "target" / "gradle-bloop-2.13").getAbsoluteFile,
581-
libraryDependencies ++= Seq(
582-
Dependencies.classgraph % Test,
583-
Dependencies.bloopConfig
584-
),
585-
Test / sourceDirectories := Nil,
586-
Test / bloopGenerate := None,
587-
Test / compile / skip := true,
588-
Test / test / skip := true
589-
)
590-
.dependsOn(integrationUtils213 % "test->compile")
591-
592523
lazy val buildpressConfig = (project in file("buildpress-config"))
593524
.settings(scalafixSettings)
594525
.settings(
@@ -696,9 +627,6 @@ val allProjects = Seq(
696627
frontend,
697628
benchmarks,
698629
sbtBloop10,
699-
gradleBloop211,
700-
gradleBloop212,
701-
gradleBloop213,
702630
nativeBridge04,
703631
jsBridge06,
704632
jsBridge1,
@@ -718,9 +646,6 @@ val allProjectsToRelease = Seq[ProjectReference](
718646
backend,
719647
frontend,
720648
sbtBloop10,
721-
gradleBloop211,
722-
gradleBloop212,
723-
gradleBloop213,
724649
nativeBridge04,
725650
jsBridge06,
726651
jsBridge1,

docs-gen/src/main/scala/bloop/Docs.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ object Docs {
1616
Map(
1717
"VERSION" -> Sonatype.releaseBloop.version,
1818
"LATEST_VERSION" -> bloop.internal.build.BuildInfo.version,
19-
"BLOOP_MAVEN_VERSION" -> Sonatype.releaseBloopMaven.version
19+
"BLOOP_MAVEN_VERSION" -> Sonatype.releaseBloopMaven.version,
20+
"BLOOP_GRADLE_VERSION" -> Sonatype.releaseBloopGradle.version
2021
)
2122
)
2223
.withArgs(args.toList)

docs-gen/src/main/scala/bloop/docs/Sonatype.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ object Sonatype {
2424
lazy val releaseBloop = fetchLatest("bloop-frontend_2.12")
2525
lazy val releaseBloopMaven = fetchLatest("bloop-maven-plugin")
2626
lazy val releaseLauncher = fetchLatest("bloop-launcher_2.12")
27+
lazy val releaseBloopGradle = fetchLatest("gradle-bloop_2.13")
2728

2829
/** Returns the latest published snapshot release, or the current release if. */
2930
private def fetchLatest(artifact: String): Release = {

docs/build-tools/gradle.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Configuring bloop in your Gradle projects will speed up your Scala
1010
development significantly. It is highly recommended to use Bloop in Gradle
1111
because Gradle has a pretty long development cycle and it takes a long time
1212
to do basic build operations such as compilation or running an application.
13+
14+
The Gradle plugin lives in its own repository at
15+
[scalacenter/gradle-bloop](https://github.com/scalacenter/gradle-bloop). Please
16+
do report any issues with the Gradle integration there!
17+
1318
Learn how to get set up by following the instructions below.
1419

1520
<!-- start -->
@@ -29,8 +34,6 @@ Here is a list of the latest Bloop stable and development versions.
2934
I am going to be replaced by the docs infrastructure.
3035
```
3136

32-
33-
3437
Add bloop to your `build.gradle` with:
3538

3639
```gradle
@@ -41,12 +44,11 @@ buildscript {
4144
}
4245
4346
dependencies {
44-
classpath 'ch.epfl.scala:gradle-bloop_2.12:@VERSION@'
47+
classpath 'ch.epfl.scala:gradle-bloop_2.12:@BLOOP_GRADLE_VERSION@'
4548
}
4649
}
4750
```
4851

49-
5052
Then, enable bloop in all your Gradle projects with:
5153

5254
```gradle

docs/contributing-guide.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ If you're looking for the Maven integration, then you'll want to make those
2828
changes in
2929
[scalacenter/bloop-maven-plugin](https://github.com/scalacenter/bloop-maven-plugin).
3030

31+
If you're looking to the Gradle integration, then you'll want to make those
32+
changes in
33+
[scalacenter/gradle-bloop](https://github.com/scalacenter/gradle-bloop).
34+
3135
## Project structure
3236

3337
Here's a list of the most important directories in the bloop repositories.
3438

3539
1. `backend` defines low-level compiler APIs wrapping Zinc APIs.
3640
1. `frontend` defines the core of bloop, the task scheduling, the CLI and all the supported tasks: compilation, testing, running and linking.
37-
1. `integrations` contains plugins for some of the supported build tools, sbt
38-
and Gradle, to extract any build to bloop.
41+
1. `integrations` contains the sbt plugin to extract any sbt build to bloop.
3942

4043
When contributing to bloop, you will most likely need to modify code in the
4144
above directories. The next directories define the rest of the project and

integrations/gradle-bloop/src/main/resources/META-INF/gradle-plugins/bloop.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

integrations/gradle-bloop/src/main/scala/bloop/integrations/gradle/BloopParameters.scala

Lines changed: 0 additions & 74 deletions
This file was deleted.

integrations/gradle-bloop/src/main/scala/bloop/integrations/gradle/BloopPlugin.scala

Lines changed: 0 additions & 33 deletions
This file was deleted.

integrations/gradle-bloop/src/main/scala/bloop/integrations/gradle/SemVer.scala

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)