Commit f6155cc6 authored by jasonczc's avatar jasonczc

Fix gradle build

parent 17af6861
...@@ -11,20 +11,22 @@ buildscript { ...@@ -11,20 +11,22 @@ buildscript {
// Do try to waste your time. // Do try to waste your time.
classpath 'com.android.tools.build:gradle:3.5.3' classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath("com.github.jengelman.gradle.plugins:shadow:5.2.0")
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicFuVersion" classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicFuVersion"
} }
} }
def keyProps = new Properties() try {
def keyFile = file("local.properties") def keyProps = new Properties()
if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) } def keyFile = file("local.properties")
if (!keyProps.getProperty("sdk.dir", "").isEmpty()) { if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) }
project.ext.set("isAndroidSDKAvailable", true) if (!keyProps.getProperty("sdk.dir", "").isEmpty()) {
} else { project.ext.set("isAndroidSDKAvailable", true)
project.ext.set("isAndroidSDKAvailable", false) } else {
} project.ext.set("isAndroidSDKAvailable", false)
}
}catch(Exception e){}
allprojects { allprojects {
group = "net.mamoe" group = "net.mamoe"
version = getProperty("mirai_version") version = getProperty("mirai_version")
......
#Thu Feb 06 14:10:33 CST 2020 #Thu Feb 06 14:10:33 CST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
......
plugins { plugins {
id("com.github.johnrengelman.shadow") version "5.2.0"
id("kotlinx-serialization") id("kotlinx-serialization")
id("kotlin") id("kotlin")
id("java") id("java")
} }
apply(plugin="com.github.johnrengelman.shadow")
val kotlinVersion: String by rootProject.ext val kotlinVersion: String by rootProject.ext
val atomicFuVersion: String by rootProject.ext val atomicFuVersion: String by rootProject.ext
val coroutinesVersion: String by rootProject.ext val coroutinesVersion: String by rootProject.ext
......
plugins { plugins {
kotlin("jvm") kotlin("jvm")
java java
id("com.github.johnrengelman.shadow") version "5.2.0" id("com.github.johnrengelman.shadow")
} }
version = "1.0.0" version = "1.0.0"
......
...@@ -59,7 +59,7 @@ if (versionPos==-1){ ...@@ -59,7 +59,7 @@ if (versionPos==-1){
def javaVersionNum = javaVersion.substring(0, versionPos).toInteger() def javaVersionNum = javaVersion.substring(0, versionPos).toInteger()
if (javaVersionNum >= 11) { if (javaVersionNum >= 11) {
println("jdk版本为 "+ javaVersionNum) println("jdk版本为 "+ javaVersionNum)
include(':mirai-debug') //include(':mirai-debug')
} else { } else {
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`") println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
} }
......
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