mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 11:21:29 +00:00
Cleaned up build.gradle.
This commit is contained in:
parent
79a0958926
commit
6daa429a4d
2 changed files with 7 additions and 23 deletions
22
build.gradle
22
build.gradle
|
@ -7,12 +7,10 @@ buildscript {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.2.3'
|
classpath 'com.android.tools.build:gradle:1.2.3'
|
||||||
classpath 'com.github.ben-manes:gradle-versions-plugin:0.10.1'
|
classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'com.github.ben-manes.versions'
|
apply plugin: 'com.github.ben-manes.versions'
|
||||||
|
|
||||||
|
@ -44,7 +42,11 @@ android {
|
||||||
buildToolsVersion "22.0.1"
|
buildToolsVersion "22.0.1"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
versionCode getVersionCodeFromManifest()
|
applicationId "com.nutomic.syncthingandroid"
|
||||||
|
minSdkVersion 8
|
||||||
|
targetSdkVersion 22
|
||||||
|
versionCode 70
|
||||||
|
versionName "0.6.4"
|
||||||
testApplicationId 'com.nutomic.syncthingandroid.test'
|
testApplicationId 'com.nutomic.syncthingandroid.test'
|
||||||
testInstrumentationRunner 'android.test.InstrumentationTestRunner'
|
testInstrumentationRunner 'android.test.InstrumentationTestRunner'
|
||||||
testHandleProfiling true
|
testHandleProfiling true
|
||||||
|
@ -100,18 +102,6 @@ android {
|
||||||
versionCode Integer.parseInt("0" + defaultConfig.versionCode)
|
versionCode Integer.parseInt("0" + defaultConfig.versionCode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def getVersionCodeFromManifest() {
|
|
||||||
def manifestFile = file(android.sourceSets.main.manifest.srcFile)
|
|
||||||
def pattern = Pattern.compile("versionCode=\"(\\d+)\"")
|
|
||||||
def matcher = pattern.matcher(manifestFile.getText())
|
|
||||||
matcher.find()
|
|
||||||
return Integer.parseInt(matcher.group(1))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildNative(type: Exec) {
|
task buildNative(type: Exec) {
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.nutomic.syncthingandroid"
|
package="com.nutomic.syncthingandroid">
|
||||||
android:versionCode="70"
|
|
||||||
android:versionName="0.6.4" >
|
|
||||||
|
|
||||||
<uses-sdk
|
|
||||||
android:minSdkVersion="8"
|
|
||||||
android:targetSdkVersion="22" />
|
|
||||||
|
|
||||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||||
|
|
Loading…
Reference in a new issue