fuck gradle, stupid fuckin bullshit - shit fuck

~ Mike
This commit is contained in:
Armin Benz 2017-04-13 22:01:57 +02:00
parent 887c013b46
commit f025501d37
2 changed files with 15 additions and 9 deletions

View File

@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="20" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="24" />
<application
android:allowBackup="true"

View File

@ -9,11 +9,14 @@ android {
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
instrumentTest.setRoot('tests')
}
}
// called every time gradle gets executed, takes the native dependencies of
// the natives configuration, and extracts them to the proper libs/ folders
// so they get packed with the APK.
@ -24,10 +27,10 @@ task copyAndroidNatives() {
configurations.natives.files.each { jar ->
def outputDir = null
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if (outputDir != null) {
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if(outputDir != null) {
copy {
from zipTree(jar)
into outputDir
@ -36,6 +39,7 @@ task copyAndroidNatives() {
}
}
}
task run(type: Exec) {
def path
def localProperties = project.file("../local.properties")
@ -57,6 +61,7 @@ task run(type: Exec) {
def adb = path + "/platform-tools/adb"
commandLine "$adb", 'shell', 'am', 'start', '-n', 'de.samdev.colorrunner.android/de.samdev.colorrunner.android.AndroidLauncher'
}
// sets up the Android Eclipse project, using the old Ant based build.
eclipse {
// need to specify Java source sets explicitely, SpringSource Gradle Eclipse plugin
@ -73,7 +78,7 @@ eclipse {
}
classpath {
plusConfigurations += project.configurations.compile
plusConfigurations += [ project.configurations.compile ]
containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES'
}
@ -87,11 +92,12 @@ eclipse {
buildCommand "com.android.ide.eclipse.adt.ApkBuilder"
}
}
// sets up the Android Idea project, using the old Ant based build.
idea {
module {
sourceDirs += file("src");
scopes = [COMPILE: [plus: [project.configurations.compile]]]
scopes = [ COMPILE: [plus:[project.configurations.compile]]]
iml {
withXml {
@ -101,11 +107,11 @@ idea {
builder.component(name: "FacetManager") {
facet(type: "android", name: "Android") {
configuration {
option(name: "UPDATE_PROPERTY_FILES", value: "true")
option(name: "UPDATE_PROPERTY_FILES", value:"true")
}
}
}
}
}
}
}
}