-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possiblity to build a FOSS version by passing -Pfoss=true to gradle
args closes #1
- Loading branch information
Showing
11 changed files
with
260 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# FossTweaks | ||
|
||
This project is used to replace the Crashlytics and Google analytics dependencies when we want to | ||
build a FOSS version of the app. | ||
|
||
# Licence | ||
|
||
Copyright 2015 eBusiness Information | ||
|
||
This file is part of OSM Contributor. | ||
|
||
OSM Contributor is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
OSM Contributor is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion 22 | ||
buildToolsVersion "22.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2015 eBusiness Information | ||
This file is part of OSM Contributor. | ||
OSM Contributor is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
OSM Contributor is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<manifest package="io.mapsquare.fosstweaks"> | ||
<application/> | ||
</manifest> |
34 changes: 34 additions & 0 deletions
34
fosstweaks/src/main/java/com/crashlytics/android/Crashlytics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Copyright (C) 2015 eBusiness Information | ||
* | ||
* This file is part of OSM Contributor. | ||
* | ||
* OSM Contributor is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* OSM Contributor is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.crashlytics.android; | ||
|
||
import android.content.Context; | ||
|
||
|
||
/** | ||
* Just a no-op implementation of crashlytics used to disable it when we want a FOSS build | ||
*/ | ||
public class Crashlytics { | ||
|
||
public static void start(Context context) { | ||
} | ||
|
||
public static void log(int priority, String tag, String msg) { | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
fosstweaks/src/main/java/com/google/android/gms/analytics/GoogleAnalytics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright (C) 2015 eBusiness Information | ||
* | ||
* This file is part of OSM Contributor. | ||
* | ||
* OSM Contributor is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* OSM Contributor is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.google.android.gms.analytics; | ||
|
||
import android.content.Context; | ||
|
||
public class GoogleAnalytics { | ||
|
||
public Tracker newTracker(String trackingId) { | ||
return new Tracker(); | ||
} | ||
|
||
|
||
public static GoogleAnalytics getInstance(Context context) { | ||
return new GoogleAnalytics(); | ||
} | ||
|
||
public void setDryRun(boolean dryRun) { | ||
} | ||
|
||
public void setLocalDispatchPeriod(int dispatchPeriodInSeconds) { | ||
|
||
} | ||
|
||
} |
51 changes: 51 additions & 0 deletions
51
fosstweaks/src/main/java/com/google/android/gms/analytics/HitBuilders.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Copyright (C) 2015 eBusiness Information | ||
* | ||
* This file is part of OSM Contributor. | ||
* | ||
* OSM Contributor is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* OSM Contributor is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.google.android.gms.analytics; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class HitBuilders { | ||
|
||
public static class EventBuilder{ | ||
public EventBuilder() {} | ||
|
||
public HitBuilders.EventBuilder setCategory(String category) { | ||
return this; | ||
} | ||
|
||
public HitBuilders.EventBuilder setAction(String action) { | ||
return this; | ||
} | ||
|
||
public Map<String, String> build() { | ||
return new HashMap<>(); | ||
} | ||
} | ||
|
||
|
||
public static class ScreenViewBuilder{ | ||
public ScreenViewBuilder() {} | ||
|
||
public Map<String, String> build() { | ||
return new HashMap<>(); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
fosstweaks/src/main/java/com/google/android/gms/analytics/Tracker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (C) 2015 eBusiness Information | ||
* | ||
* This file is part of OSM Contributor. | ||
* | ||
* OSM Contributor is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* OSM Contributor is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OSM Contributor. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.google.android.gms.analytics; | ||
|
||
import java.util.Map; | ||
|
||
public class Tracker { | ||
public void send(Map<String, String> params) { | ||
} | ||
|
||
public void enableAutoActivityTracking(boolean enabled) { | ||
} | ||
|
||
public void enableAdvertisingIdCollection(boolean enabled) { | ||
} | ||
|
||
public void setScreenName(String screenName) { | ||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<integer name="google_play_services_version">0</integer> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include 'navdrawer' | ||
include 'fab' | ||
include 'fab' | ||
include 'fosstweaks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters