Skip to content

Commit

Permalink
Update to gradle 4
Browse files Browse the repository at this point in the history
And add SonarQube integration.
  • Loading branch information
markusfisch committed Jan 12, 2018
1 parent 684a0fb commit f8b6fbd
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
build
local.properties
gradle.properties
.aside
infer-out
.aside
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE = de.markusfisch.android.pielauncher
APK = app/build/outputs/apk/app-debug.apk
APK = app/build/outputs/apk/debug/app-debug.apk

all: debug install start

Expand All @@ -12,6 +12,9 @@ lint:
findbugs:
./gradlew findBugs

sonarqube:
./gradlew sonarqube

infer: clean
infer -- ./gradlew assembleDebug

Expand Down
19 changes: 19 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
apply plugin: 'com.android.application'
apply plugin: 'findbugs'
apply plugin: 'net.ltgt.errorprone'

configurations.errorprone {
resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.0.19'
}

android {
compileSdkVersion sdk_version
Expand All @@ -8,6 +13,20 @@ android {
defaultConfig {
minSdkVersion 9
targetSdkVersion sdk_version

versionCode 1
versionName '0.0.0'
}

buildTypes {
debug {
applicationIdSuffix '.debug'
}

release {
minifyEnabled true
shrinkResources true
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="de.markusfisch.android.pielauncher"
android:versionCode="1"
android:versionName="0.0.0"
android:installLocation="auto">
<supports-screens
android:resizeable="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private void stopThread() {
thread.join();
break;
} catch (InterruptedException e) {
// try again
thread.interrupt();
}
}
}
Expand Down
17 changes: 14 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
buildscript {
ext.tools_version = '2.3.0'
ext.build_tools_version = '25.0.2'
ext.sdk_version = 25
ext.tools_version = '3.0.0'
ext.build_tools_version = '26.0.2'
ext.sdk_version = 27
ext.support_version = '25.3.1'

repositories {
jcenter()
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}

dependencies {
classpath "com.android.tools.build:gradle:$tools_version"
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.10'
}
}

plugins {
id 'org.sonarqube' version '2.6'
}

allprojects {
repositories {
jcenter()
google()
}

gradle.projectsEvaluated {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 comments on commit f8b6fbd

Please sign in to comment.