Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mojtabamarashee/291d9f7b7098912eea12acb1b55244b4 to your computer and use it in GitHub Desktop.
Save mojtabamarashee/291d9f7b7098912eea12acb1b55244b4 to your computer and use it in GitHub Desktop.
build android apk gradle
<link href="https://cdn.rawgit.com/Killercodes/281792c423a4fe5544d9a8d36a4430f2/raw/36c2eb3e0c44133880485a143717bda9d180f2c1/GistDarkCode.css" rel="stylesheet" type="text/css">
mkdir gradle
cd gradle
/usr/share/android-sdk/tools/android create project -p . -a MainActivity -k com.domain.myproject -t android-21 -g -v 0.12.+
keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
apply plugin: 'android'
android {
compileSdkVersion 'android-21'
buildToolsVersion '23.0.3'
signingConfigs {
release {
storeFile file('my-release-key.keystore')
storePassword '*******'
keyAlias 'my-key-alias'
keyPassword '*******'
}
}
buildTypes {
release {
runProguard false
proguardFile getDefaultProguardFile('proguard-android.txt')
signingConfig signingConfigs.release
}
}
}
./gradlew assembleRelease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment