Commit ec72820ce96456ae30f1af8cde1979f4e9c7cd8f
1 parent
bf0efe79
Exists in
master
sonar push
Showing
5 changed files
with
24 additions
and
7 deletions
Show diff stats
.idea/vcs.xml
app/build.gradle
1 | 1 | apply plugin: 'com.android.application' |
2 | - | |
2 | +apply plugin: 'org.sonarqube' | |
3 | 3 | android { |
4 | 4 | compileSdkVersion 28 |
5 | 5 | defaultConfig { |
... | ... | @@ -25,14 +25,28 @@ android { |
25 | 25 | manifestPlaceholders = [appLabel: "Sherbet app", appIcon: "@mipmap/ic_launcher"] |
26 | 26 | versionCode 2 |
27 | 27 | versionName "1.2" |
28 | - buildConfigField "String", "PRIMARYCOLOR", "\"#000000\"" | |
28 | + // buildConfigField "String", "PRIMARYCOLOR", "\"#000000\"" | |
29 | + //buildConfigField "String", "SERVER_URL", "\"http://dev.myserver.com\"" | |
30 | + buildConfigField "String", "BUILD_VARIANT", "\"sherbet\"" | |
29 | 31 | } |
30 | 32 | excel { |
31 | 33 | applicationId "driver.excel.multiflaver" |
32 | 34 | manifestPlaceholders = [appLabel: "Excel app", appIcon: "@mipmap/ic_launcher"] |
33 | 35 | versionCode 10 |
34 | 36 | versionName "1.1.1" |
35 | - buildConfigField "String", "PRIMARYCOLOR", "\"#FFFFFF\"" | |
37 | + //buildConfigField "String", "PRIMARYCOLOR", "\"#FFFFFF\"" | |
38 | + //buildConfigField "String", "SERVER_URL", "\"http://dev.myserver.com\"" | |
39 | + buildConfigField "String", "BUILD_VARIANT", "\"excel\"" | |
40 | + } | |
41 | + } | |
42 | + sonarqube { | |
43 | + properties { | |
44 | + property "sonar.projectKey", "MultiFlaver" | |
45 | + property "sonar.login", "1f97dce11a8c32441874165a97737d8a854f24b6" | |
46 | + property "sonar.host.url", "http://localhost:9000" | |
47 | + //property "sonar.java.binaries", "${sourceSets.main.output.classesDir}" | |
48 | + //property "sonar.login", "admin" | |
49 | + //property "sonar.password", "admin" | |
36 | 50 | } |
37 | 51 | } |
38 | 52 | } | ... | ... |
app/src/main/java/com/excel/multiflaver/MainActivity.java
... | ... | @@ -4,6 +4,7 @@ import android.graphics.Color; |
4 | 4 | import android.support.v7.app.AppCompatActivity; |
5 | 5 | import android.os.Bundle; |
6 | 6 | import android.widget.Button; |
7 | +import android.widget.Toast; | |
7 | 8 | |
8 | 9 | public class MainActivity extends AppCompatActivity { |
9 | 10 | |
... | ... | @@ -13,8 +14,8 @@ public class MainActivity extends AppCompatActivity { |
13 | 14 | protected void onCreate(Bundle savedInstanceState) { |
14 | 15 | super.onCreate(savedInstanceState); |
15 | 16 | setContentView(R.layout.activity_main); |
16 | - | |
17 | 17 | button = (Button) findViewById(R.id.button); |
18 | - button.setTextColor(Color.parseColor(BuildConfig.PRIMARYCOLOR)); | |
18 | + | |
19 | + Toast.makeText(MainActivity.this, "Current Tenant is -- " + BuildConfig.BUILD_VARIANT, Toast.LENGTH_LONG).show(); | |
19 | 20 | } |
20 | 21 | } | ... | ... |
app/src/main/res/layout/activity_main.xml
... | ... | @@ -110,7 +110,7 @@ |
110 | 110 | android:drawableTint="@color/colorWhite" |
111 | 111 | android:text="Log in to your account" |
112 | 112 | android:textAllCaps="false" |
113 | - android:textColor="#fff" | |
113 | + android:textColor="@color/colorAccent" | |
114 | 114 | android:textSize="14sp" /> |
115 | 115 | </LinearLayout> |
116 | 116 | </RelativeLayout> | ... | ... |
build.gradle
... | ... | @@ -4,10 +4,12 @@ buildscript { |
4 | 4 | repositories { |
5 | 5 | google() |
6 | 6 | jcenter() |
7 | + maven { url "https://plugins.gradle.org/m2/" } | |
7 | 8 | |
8 | 9 | } |
9 | 10 | dependencies { |
10 | 11 | classpath 'com.android.tools.build:gradle:3.4.0' |
12 | + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6' | |
11 | 13 | |
12 | 14 | // NOTE: Do not place your application dependencies here; they belong |
13 | 15 | // in the individual module build.gradle files | ... | ... |