Commit 8774baca authored by Saif Abdul Cassim's avatar Saif Abdul Cassim

Hardcoded the javahome and jdk paths, downgraded the project to gradle 4.4.1...

Hardcoded the javahome and jdk paths, downgraded the project to gradle 4.4.1 but it still wont work in sid with openjdk-11 and sid gradle
parent a6a9e880
......@@ -104,10 +104,10 @@ ext.isSonatypeRelease = false
// Work-around necessary to avoid setting null javaHome. Will be removed after support of lazy task configuration
def jdkNotFoundConst = "JDK NOT FOUND"
ext.jdkNotFoundConst =jdkNotFoundConst
ext.JDK_16 = jdkPath("1.6")
ext.JDK_17 = jdkPath("1.7")
ext.JDK_18 = jdkPath("1.8")
ext.JDK_9 = jdkPath("9")
ext.JDK_16 = "/usr/lib/jvm/java-8-openjdk-amd64"
ext.JDK_17 = "/usr/lib/jvm/java-8-openjdk-amd64"
ext.JDK_18 = "/usr/lib/jvm/java-8-openjdk-amd64"
ext.JDK_9 = "/usr/lib/jvm/java-11-openjdk-amd64"
ext.JDK_10 = jdkPath("10")
ext.JDK_11 = jdkPath("11")
gradle.taskGraph.beforeTask() {
......
......@@ -125,12 +125,15 @@ private fun String.toMaybeVersionedJarRegex(): Regex {
}
fun Project.firstFromJavaHomeThatExists(vararg paths: String, jdkHome: File = File(this.property("JDK_18") as String)): File? =
fun Project.firstFromJavaHomeThatExists(vararg paths: String, jdkHome: File = File(this.property("JDK_16") as String)): File? =
paths.map { File(jdkHome, it) }.firstOrNull { it.exists() }.also {
if (it == null)
logger.warn("Cannot find file by paths: ${paths.toList()} in $jdkHome")
}
fun customFirstFromJavaHomeThatExists(project: Project,paths: List<String>, jdkHome: File = File(project.property("JDK_18") as String)): File?{return project.firstFromJavaHomeThatExists(*paths.toTypedArray(),jdkHome=jdkHome)}
fun customFirstFromJavaHomeThatExists(project: Project,paths: List<String>, jdkHome: File = File(project.property("JDK_16") as String)): File?{
println(project.property("JDK_16") as String)
return project.firstFromJavaHomeThatExists(*paths.toTypedArray(),jdkHome=jdkHome)
}
fun Project.toolsJar(jdkHome: File = File(this.property("JDK_18") as String)): File? =
firstFromJavaHomeThatExists("lib/tools.jar", jdkHome = jdkHome)
fun customToolsJar(project:Project):File?{return project.toolsJar()}
......
......@@ -50,9 +50,9 @@ fun intellijSdkRepo(repositoryHandler:RepositoryHandler,project: Project): IvyAr
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/[module]/[artifact](-[revision])(-[classifier]).jar")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/sources/[artifact]-[revision]-[classifier].[ext]")
metadataSources {
/*metadataSources {
ivyDescriptor()
}
}*/
}
fun Project.intellijDep(module: String = "intellij") = "kotlin.build.custom.deps:$module:${rootProject.getExtensions().getExtraProperties().get("versions.intellijSdk")}"
......
org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m -Dfile.encoding=UTF-8
cacheRedirectorEnabled=true
kotlin.compiler.effectSystemEnabled=true
kotlin.compiler.newInferenceEnabled=true
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
......@@ -12,3 +11,4 @@ kotlin.compiler.newInferenceEnabled=true
#jpsBuild=true
#cidrPluginsEnabled=true
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......@@ -45,7 +45,7 @@ compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
}
test {
/*test {
useJUnitPlatform()
executable = "$JDK_18/bin/java"
}
}*/
......@@ -51,7 +51,7 @@ dependencies {
proguardDeps(DependenciesKt.customKotlinStdlib(project,null))
proguardAdditionalInJars(project(":kotlin-annotations-jvm"))
proguardDeps(files(DependenciesKt.customFirstFromJavaHomeThatExists(project,["jre/lib/rt.jar", "../Classes/classes.jar"], new File(property("JDK_16") as String))))
proguardDeps(files(DependenciesKt.customFirstFromJavaHomeThatExists(project,["./jre/lib/rt.jar", "../Classes/classes.jar"], new File(property("JDK_16") as String))))
shadows(project(":kotlin-reflect-api"))
shadows(project(":core:metadata"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment