mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-28 09:30:10 +08:00
Fix gradle build
This commit is contained in:
parent
17af686147
commit
f6155cc6a5
20
build.gradle
20
build.gradle
@ -11,20 +11,22 @@ buildscript {
|
||||
// Do try to waste your time.
|
||||
classpath 'com.android.tools.build:gradle:3.5.3'
|
||||
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.kotlinx:atomicfu-gradle-plugin:$atomicFuVersion"
|
||||
}
|
||||
}
|
||||
|
||||
def keyProps = new Properties()
|
||||
def keyFile = file("local.properties")
|
||||
if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) }
|
||||
if (!keyProps.getProperty("sdk.dir", "").isEmpty()) {
|
||||
project.ext.set("isAndroidSDKAvailable", true)
|
||||
} else {
|
||||
project.ext.set("isAndroidSDKAvailable", false)
|
||||
}
|
||||
|
||||
try {
|
||||
def keyProps = new Properties()
|
||||
def keyFile = file("local.properties")
|
||||
if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) }
|
||||
if (!keyProps.getProperty("sdk.dir", "").isEmpty()) {
|
||||
project.ext.set("isAndroidSDKAvailable", true)
|
||||
} else {
|
||||
project.ext.set("isAndroidSDKAvailable", false)
|
||||
}
|
||||
}catch(Exception e){}
|
||||
allprojects {
|
||||
group = "net.mamoe"
|
||||
version = getProperty("mirai_version")
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
#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
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -1,10 +1,11 @@
|
||||
plugins {
|
||||
id("com.github.johnrengelman.shadow") version "5.2.0"
|
||||
id("kotlinx-serialization")
|
||||
id("kotlin")
|
||||
id("java")
|
||||
}
|
||||
|
||||
apply(plugin="com.github.johnrengelman.shadow")
|
||||
|
||||
val kotlinVersion: String by rootProject.ext
|
||||
val atomicFuVersion: String by rootProject.ext
|
||||
val coroutinesVersion: String by rootProject.ext
|
||||
|
@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
java
|
||||
id("com.github.johnrengelman.shadow") version "5.2.0"
|
||||
id("com.github.johnrengelman.shadow")
|
||||
}
|
||||
|
||||
version = "1.0.0"
|
||||
|
@ -59,7 +59,7 @@ if (versionPos==-1){
|
||||
def javaVersionNum = javaVersion.substring(0, versionPos).toInteger()
|
||||
if (javaVersionNum >= 11) {
|
||||
println("jdk版本为 "+ javaVersionNum)
|
||||
include(':mirai-debug')
|
||||
//include(':mirai-debug')
|
||||
} else {
|
||||
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user