[space plugin] Allow to run Space Automation from sources
[idea/community.git] / build / dependencies / build.gradle
1 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
2 buildscript {
3   repositories {
4     maven { url "https://cache-redirector.jetbrains.com/plugins.gradle.org" }
5   }
6   dependencies {
7     classpath "de.undercouch:gradle-download-task:3.4.2"
8     classpath "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.5"
9   }
10 }
11
12 allprojects {
13   apply plugin: 'idea'
14   idea {
15     module {
16       inheritOutputDirs true
17     }
18   }
19 }
20
21 apply plugin: "de.undercouch.download"
22 apply plugin: 'base'
23
24 group 'intellij.tools'
25 version '1.0'
26
27 try {
28   project.ext.inJetBrainsNetwork = InetAddress.getByName("repo.labs.intellij.net").isReachable(5000)
29   if (!project.ext.inJetBrainsNetwork && org.gradle.internal.os.OperatingSystem.current().isWindows()) {
30     project.ext.inJetBrainsNetwork = Runtime.getRuntime().exec("ping -n 1 repo.labs.intellij.net").waitFor() == 0
31   }
32   if (!project.ext.inJetBrainsNetwork) {
33     logger.info('repo.labs.intellij.net is not reachable')
34   }
35 }
36 catch (UnknownHostException e) {
37   logger.info('repo.labs.intellij.net is not reachable', e)
38   project.ext.inJetBrainsNetwork = false
39 }
40
41 apply from: 'setupJdk.gradle'
42 apply from: 'setupJbre.gradle'
43 apply from: 'setupKotlin.gradle'
44 apply from: 'setupThirdPartyPlugins.gradle'
45 apply from: 'setupJetSign.gradle'
46 apply from: 'setupAndroidSdk.gradle'
47 apply from: 'setupBuildScriptsDeps.gradle'
48 apply from: 'setupToolboxLiteGen.gradle'
49 apply from: 'setupBundledMaven.gradle'
50 apply from: 'setupCidr.gradle'
51 apply from: 'setupCodeWithMe.gradle'
52 apply from: 'setupDelve.gradle'
53 apply from: 'setupRpluginDeps.gradle'
54 apply from: 'setupSpacePlugin.gradle'
55 apply from: 'setupZkm.gradle'
56
57 task setupDependencies(dependsOn: ['setupJdks', 'setupJbre', 'setupKotlinPlugin', 'setupThirdPartyPlugins',
58                                    'setupJetSign', 'setupBundledMaven'], group: 'dependencies')
59 clean.dependsOn('cleanSetupJdks', 'cleanSetupJbre', 'cleanSetupKotlinPlugin', 'cleanSetupJetSign', 'cleanSetupBundledMaven')
60
61 task dependenciesFile() {
62   description = 'Creates file with all dependencies version, even those that were overloaded by system or env properties'
63   def outputFile = "$project.buildDir/dependencies.properties"
64   outputs.upToDateWhen { false }
65   outputs.file(outputFile)
66   doFirst {
67     def properties = new Properties()
68     file('gradle.properties').withInputStream { properties.load(it) }
69     file(outputFile).text = properties.stringPropertyNames().collect { "$it=${project.ext[it]}" }.join('\n')
70   }
71 }
72
73 wrapper {
74   gradleVersion = '5.5'
75   distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
76 }