move main project files into standard gradle/Android Studio layout

This makes it a lot easier to setup all the testing stuff.  Mostly,
I'm tired of fighting Android Studio's fragility, so I want to remove
as much non-standardness as possible in the hopes of improving that
situation.

closes #534 https://gitlab.com/fdroid/fdroidclient/issues/534
This commit is contained in:
Hans-Christoph Steiner 2016-03-28 12:12:37 +02:00
parent f9063b5058
commit 3fcdfe85bb
531 changed files with 12 additions and 36 deletions

View File

@ -10,14 +10,14 @@ gradle:
- export GRADLE_USER_HOME=$PWD/.gradle
- ./gradlew assemble
# always report on lint errors to the build log
- sed -i -e 's,textReport .*,textReport true,' F-Droid/build.gradle
- sed -i -e 's,textReport .*,textReport true,' app/build.gradle
- ./gradlew check
- echo no | android create avd --force -n fcl-test -t android-10 -b armeabi
- emulator -force-32bit -avd fcl-test -no-skin -no-audio -no-window &
- ./tools/wait-for-emulator
- adb shell input keyevent 82
- ADB_INSTALL_TIMEOUT=8 ./gradlew connectedCheck || { adb logcat -d '*:W'; exit 1; }
- sed -n 's/.*"ctr2">\([0-9]*\)%<.*/Coverage - \1.0% covered\n/p' F-Droid/build/reports/coverage/debug/index.html
- sed -n 's/.*"ctr2">\([0-9]*\)%<.*/Coverage - \1.0% covered\n/p' app/build/reports/coverage/debug/index.html
pmd:
script:
@ -31,6 +31,6 @@ checkstyle:
tools:
script:
- cd F-Droid
- cd app
- ./tools/langs-list-check.py
- ./tools/check-string-format.py

View File

@ -7,7 +7,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := F-Droid
fdroid_root := $(LOCAL_PATH)
fdroid_dir := F-Droid
fdroid_dir := app
fdroid_out := $(PWD)/$(OUT_DIR)/target/common/obj/APPS/$(LOCAL_MODULE)_intermediates
fdroid_build := $(fdroid_root)/$(fdroid_dir)/build
fdroid_apk := build/outputs/apk/F-Droid-release-unsigned.apk
@ -23,4 +23,4 @@ LOCAL_SRC_FILES := $(fdroid_dir)/$(fdroid_apk)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
include $(BUILD_PREBUILT)

View File

@ -7,8 +7,7 @@ for Android.
## Building with Gradle
cd F-Droid
../gradlew assembleRelease
./gradlew assembleRelease
## Direct download

View File

@ -123,29 +123,6 @@ android {
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
androidTest.setRoot('test')
androidTest {
manifest.srcFile 'test/AndroidManifest.xml'
java.srcDirs = ['test/src']
resources.srcDirs = ['test/src']
aidl.srcDirs = ['test/src']
renderscript.srcDirs = ['test/src']
res.srcDirs = ['test/res']
assets.srcDirs = ['test/assets']
}
}
buildTypes {
// use proguard on debug too since we have unknowingly broken
// release builds before.

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 887 B

After

Width:  |  Height:  |  Size: 887 B

Some files were not shown because too many files have changed in this diff Show More