Skip to content

Commit bfa5eec

Browse files
committed
Store sass in a "$rootProject/.gradle/sass" subdirectory per subproject (#23)
1 parent 5acd236 commit bfa5eec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/io/miret/etienne/gradle/sass/SassGradlePluginExtension.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.gradle.api.Project;
66

77
import java.io.File;
8+
import java.nio.file.Path;
89

910
@Getter
1011
@Setter
@@ -19,10 +20,14 @@ public class SassGradlePluginExtension {
1920
private boolean autoCopy;
2021

2122
public SassGradlePluginExtension (Project project) {
23+
Path projectPath = project.getRootDir()
24+
.toPath()
25+
.relativize(project.getProjectDir().toPath());
2226
this.version = "1.54.0";
23-
this.directory = project.getProjectDir ()
27+
this.directory = project.getRootDir()
2428
.toPath ()
2529
.resolve (".gradle/sass")
30+
.resolve(projectPath)
2631
.toFile ();
2732
this.baseUrl = "https://github.com/sass/dart-sass/releases/download";
2833
this.autoCopy = true;

0 commit comments

Comments
 (0)