File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed
src/main/kotlin/org/jetbrains/intellij Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -320,23 +320,6 @@ abstract class IdeaDependencyManager @Inject constructor(
320
320
else -> " zip"
321
321
},
322
322
) {
323
-
324
- fun getAndroidStudioPath (parentPath : Path ): Path {
325
- val androidStudioPath = if (OperatingSystem .current().isMacOsX) {
326
- // such as Android Studio.app/Contents
327
- Files .list(parentPath).filter { child ->
328
- child.extension == " app"
329
- }.findFirst().get().resolve(" Contents" )
330
- } else {
331
- parentPath.resolve(" android-studio" )
332
- }
333
- info(
334
- context, " Current system is ${OperatingSystem .current().name} " +
335
- " and AndroidStudio path is $androidStudioPath "
336
- )
337
- return androidStudioPath
338
- }
339
-
340
323
with (it.toPath()) {
341
324
Files .list(resolveAndroidStudioPath(this ))
342
325
.forEach { entry -> Files .move(entry, resolve(entry.fileName), StandardCopyOption .REPLACE_EXISTING ) }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import org.gradle.api.logging.Logging
29
29
import org.gradle.api.plugins.JavaPluginConvention
30
30
import org.gradle.api.tasks.SourceSet
31
31
import org.gradle.internal.os.OperatingSystem
32
- import org.gradle.kotlin.dsl.getByType
32
+ import org.gradle.kotlin.dsl.getPlugin
33
33
import org.gradle.process.JavaForkOptions
34
34
import org.jdom2.Document
35
35
import org.jdom2.JDOMException
@@ -61,7 +61,8 @@ import java.util.function.Predicate
61
61
val MAJOR_VERSION_PATTERN = " (RIDER-|GO-)?\\ d{4}\\ .\\ d-(EAP\\ d*-)?SNAPSHOT" .toPattern()
62
62
63
63
fun mainSourceSet (project : Project ): SourceSet = project
64
- .extensions.getByType<JavaPluginConvention >()
64
+ .convention.getPlugin<JavaPluginConvention >()
65
+ // .extensions.getByType<JavaPluginConvention>() // available since Gradle 7.1
65
66
.sourceSets.getByName(SourceSet .MAIN_SOURCE_SET_NAME )
66
67
67
68
fun sourcePluginXmlFiles (project : Project ) = mainSourceSet(project).resources.srcDirs.mapNotNull {
You can’t perform that action at this time.
0 commit comments