Skip to content

Commit 4127004

Browse files
committed
Gradle file refactoring
1 parent 50e5d45 commit 4127004

File tree

12 files changed

+51
-41
lines changed

12 files changed

+51
-41
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.settings/
33
bin/
44
build/
5+
.project

BasicSamples/BeGenerous/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion android_compile_version
@@ -20,10 +20,10 @@ android {
2020
}
2121

2222
dependencies {
23+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
24+
compile "com.android.support:support-v4:${support_library_version}"
25+
compile "com.google.android.gms:play-services:${gms_library_version}"
2326
compile project(':libraries:BaseGameUtils')
24-
compile android_appcompat_library
25-
compile android_support_library
26-
compile android_gms_library
2727
}
2828

2929
buildscript {

BasicSamples/ButtonClicker/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion android_compile_version
@@ -20,9 +20,9 @@ android {
2020
}
2121

2222
dependencies {
23-
compile android_appcompat_library
24-
compile android_support_library
25-
compile android_gms_library
23+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
24+
compile "com.android.support:support-v4:${support_library_version}"
25+
compile "com.google.android.gms:play-services:${gms_library_version}"
2626
compile project(':libraries:BaseGameUtils')
2727
}
2828

BasicSamples/CollectAllTheStars2/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion android_compile_version
@@ -20,9 +20,9 @@ android {
2020
}
2121

2222
dependencies {
23-
compile android_appcompat_library
24-
compile android_support_library
25-
compile android_gms_library
23+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
24+
compile "com.android.support:support-v4:${support_library_version}"
25+
compile "com.google.android.gms:play-services:${gms_library_version}"
2626
compile project(':libraries:BaseGameUtils')
2727
}
2828

BasicSamples/SavedGames/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion android_compile_version
@@ -20,10 +20,10 @@ android {
2020
}
2121

2222
dependencies {
23+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
24+
compile "com.android.support:support-v4:${support_library_version}"
25+
compile "com.google.android.gms:play-services:${gms_library_version}"
2326
compile project(':libraries:BaseGameUtils')
24-
compile android_appcompat_library
25-
compile android_support_library
26-
compile android_gms_library
2727
}
2828

2929
buildscript {

BasicSamples/SkeletonTbmp/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
enforceUniquePackageName=false
@@ -22,10 +22,10 @@ android {
2222
}
2323

2424
dependencies {
25+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
26+
compile "com.android.support:support-v4:${support_library_version}"
27+
compile "com.google.android.gms:play-services:${gms_library_version}"
2528
compile project(':libraries:BaseGameUtils')
26-
compile android_appcompat_library
27-
compile android_support_library
28-
compile android_gms_library
2929
}
3030

3131
buildscript {

BasicSamples/TrivialQuest/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
enforceUniquePackageName=false
@@ -23,10 +23,10 @@ android {
2323
}
2424

2525
dependencies {
26+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
27+
compile "com.android.support:support-v4:${support_library_version}"
28+
compile "com.google.android.gms:play-services:${gms_library_version}"
2629
compile project(':libraries:BaseGameUtils')
27-
compile android_appcompat_library
28-
compile android_support_library
29-
compile android_gms_library
3030
}
3131

3232
buildscript {

BasicSamples/TrivialQuest2/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion android_compile_version
@@ -14,9 +14,9 @@ android {
1414
}
1515

1616
dependencies {
17-
compile android_appcompat_library
18-
compile android_support_library
19-
compile android_gms_library
17+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
18+
compile "com.android.support:support-v4:${support_library_version}"
19+
compile "com.google.android.gms:play-services:${gms_library_version}"
2020
compile project(':libraries:BaseGameUtils')
2121
}
2222

BasicSamples/TypeANumber/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
44
enforceUniquePackageName=false
@@ -22,10 +22,10 @@ android {
2222
}
2323

2424
dependencies {
25+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
26+
compile "com.android.support:support-v4:${support_library_version}"
27+
compile "com.google.android.gms:play-services:${gms_library_version}"
2528
compile project(':libraries:BaseGameUtils')
26-
compile android_appcompat_library
27-
compile android_support_library
28-
compile android_gms_library
2929
}
3030

3131
buildscript {

BasicSamples/TypeANumber/src/main/res/values/ids.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
http://www.apache.org/licenses/LICENSE-2.0
1010
11-
Unless required by applicable law or agreed to in writing, software
11+
Unless required byhttps://www.google.com/about/careers/ applicable law or agreed to in writing, software
1212
distributed under the License is distributed on an "AS IS" BASIS,
1313
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and

BasicSamples/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
buildscript {
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:1.1.0'
7+
classpath 'com.android.tools.build:gradle:1.0.0'
88
}
99
}
1010

@@ -19,9 +19,9 @@ allprojects {
1919
android_version = '20'
2020
android_min_sdk_version = 9
2121

22-
android_appcompat_library = 'com.android.support:appcompat-v7:20.0.+'
23-
android_support_library = 'com.android.support:support-v4:20.0.+'
24-
android_gms_library = 'com.google.android.gms:play-services:6.5+'
22+
appcompat_library_version = '20.0.+'
23+
support_library_version = '20.0.+'
24+
gms_library_version = '6.5+'
2525
}
2626
}
2727

BasicSamples/libraries/BaseGameUtils/build.gradle

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'android-library'
1+
apply plugin: 'com.android.library'
22

33

44
buildscript {
@@ -12,9 +12,18 @@ buildscript {
1212
}
1313

1414
dependencies {
15-
compile android_appcompat_library
16-
compile android_support_library
17-
compile android_gms_library
15+
android_compile_version = 20
16+
android_version = '20'
17+
android_min_sdk_version = 9
18+
19+
// Set defaults so that BaseGameUtils can be used outside of BasicSamples
20+
appcompat_library_version = appcompat_library_version ?: '20.0.+'
21+
support_library_version = support_library_version ?: '20.0.+'
22+
gms_library_version = gms_library_version ?: '6.5+'
23+
24+
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
25+
compile "com.android.support:support-v4:${support_library_version}"
26+
compile "com.google.android.gms:play-services:${gms_library_version}"
1827
}
1928

2029
android {

0 commit comments

Comments
 (0)