diff --git a/app/build.gradle b/app/build.gradle index 456ca130..2b88b73d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,26 +5,28 @@ android { buildToolsVersion "23.0.3" dependencies { - compile 'com.android.support:support-annotations:23.3.0' - } - - sourceSets { - main { - jni.srcDirs = [] - } + compile 'com.android.support:support-annotations:23.4.0' + compile "com.android.support:support-v4:23.4.0" } defaultConfig { applicationId "com.termux" minSdkVersion 21 targetSdkVersion 23 - versionCode 34 - versionName "0.34" + versionCode 35 + versionName "0.35" + + ndk { + moduleName "libtermux" + abiFilters "armeabi-v7a", "arm64-v8a", "x86" + cFlags "-std=c11 -Wall -Wextra -Os -fno-stack-protector -nostdlib -Wl,--gc-sections" + } } buildTypes { release { - minifyEnabled false + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } diff --git a/app/src/main/jni/Android.mk b/app/src/main/jni/Android.mk deleted file mode 100644 index 6c6f8b22..00000000 --- a/app/src/main/jni/Android.mk +++ /dev/null @@ -1,5 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE:= libtermux -LOCAL_SRC_FILES:= termux.c -include $(BUILD_SHARED_LIBRARY) diff --git a/app/src/main/jni/Application.mk b/app/src/main/jni/Application.mk deleted file mode 100644 index a1eb48cb..00000000 --- a/app/src/main/jni/Application.mk +++ /dev/null @@ -1,5 +0,0 @@ -APP_ABI := arm64-v8a armeabi-v7a x86 -APP_PLATFORM := android-21 -NDK_TOOLCHAIN_VERSION := 4.9 -APP_CFLAGS := -std=c11 -Wall -Wextra -Os -fno-stack-protector -APP_LDFLAGS = -nostdlib -Wl,--gc-sections diff --git a/build-jnilibs.sh b/build-jnilibs.sh deleted file mode 100755 index 91aeb1e2..00000000 --- a/build-jnilibs.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Script to build jni libraries while waiting for the new gradle build system: -# http://tools.android.com/tech-docs/new-build-system/gradle-experimental#TOC-Ndk-Integration - -set -e -u - -SRC_JNILIBS=app/src/main/jniLibs/ -rm -Rf $SRC_JNILIBS -mkdir -p $SRC_JNILIBS - -PROJECTDIR=`mktemp -d` -JNIDIR=$PROJECTDIR/jni -LIBSDIR=$PROJECTDIR/libs - -mkdir $JNIDIR -cp app/src/main/jni/* $JNIDIR/ - -ndk-build NDK_PROJECT_PATH=$PROJECTDIR -cp -Rf $LIBSDIR/* $SRC_JNILIBS - -rm -Rf $PROJECTDIR diff --git a/gradle.properties b/gradle.properties index d7e81f80..e647e1e2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,17 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - +## Project-wide Gradle settings. +# # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - +# # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -org.gradle.jvmargs=-Xmx2048M - +# # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +#Fri May 13 01:11:09 CEST 2016 +org.gradle.jvmargs=-Xmx2048M +android.useDeprecatedNdk=true