Skip to content

Commit

Permalink
Packages names updates (#55)
Browse files Browse the repository at this point in the history
* update application id to org.maplibre*

* updated main package paths to maplibre

* updated debug paths to maplibre

* updated androidTest package paths to maplibre

* updated scrips import paths to maplibre

* made a typo with package name ~ updated from androidk to android

* updated scripts import paths to maplibre

* updated package import paths to maplibre

* updated Test package import paths to maplibre

* updated package import paths to maplibre for ejs files

* all generated classes now have correct package import

* updated package import paths to maplibre for android manifest

* updated package import paths to maplibre for manifest

* updated package import paths to maplibre for ejs files

* updated package import paths to maplibre for ejs files

* updated package import paths to maplibre for ejs files

* updated package import paths 'from generated classes' to maplibre

* updated package import paths 'from generated classes' to maplibre

* updated package import paths 'activity gen'file

* updated package import paths in both file

* updated import path for generated resources classes such as android R

* updated import path for generated resources classes R

* updated package import path

* updated names to maplibre

* updated package import path

* updated package import path

* updated package import path

* updated names

* updated resources prefix to maplibre

* updated package import path

* updated package import path

* updated package import path

* updated package import path

* updated names

* updated names

* generated classes updated ~ after running nitpick

* updates package imports to single imports instead for .* ~ for checkstyle

* generated classes updated ~ after running nitpick

* removed comment

* lint error corrected ~ Made sure filename match activity class Name

* Replace constants

---------

Co-authored-by: Bart Louwers <[email protected]>
  • Loading branch information
kocheick and louwers authored May 20, 2024
1 parent 36a02c0 commit 72a5729
Show file tree
Hide file tree
Showing 165 changed files with 751 additions and 884 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
defaultConfig {
minSdkVersion androidVersions.minSdkVersion
targetSdkVersion androidVersions.targetSdkVersion
applicationId "com.mapbox.mapboxsdk.plugins.testapp"
applicationId "org.maplibre.android.plugins.testapp"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
package com.mapbox.mapboxsdk.plugins;
package org.maplibre.android.plugins;

import android.app.Activity;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction;
import com.mapbox.mapboxsdk.plugins.annotation.WaitAction;
import com.mapbox.mapboxsdk.plugins.utils.OnMapReadyIdlingResource;

import androidx.test.espresso.Espresso;
import androidx.test.espresso.IdlingRegistry;
import androidx.test.espresso.IdlingResourceTimeoutException;
import androidx.test.espresso.ViewInteraction;
import androidx.test.rule.ActivityTestRule;
import junit.framework.Assert;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.maplibre.android.maps.MapLibreMap;

import androidx.test.espresso.Espresso;
import androidx.test.espresso.IdlingRegistry;
import androidx.test.espresso.IdlingResourceTimeoutException;
import androidx.test.espresso.ViewInteraction;
import androidx.test.rule.ActivityTestRule;

import org.maplibre.android.plugins.annotation.MapLibreMapAction;
import org.maplibre.android.plugins.annotation.WaitAction;
import org.maplibre.android.plugins.utils.OnMapReadyIdlingResource;
import timber.log.Timber;

import static androidx.test.espresso.Espresso.onView;
Expand Down Expand Up @@ -92,8 +87,8 @@ protected ViewInteraction onMapView() {
return onView(withId(android.R.id.content));
}

protected MapboxMapAction getMapboxMapAction(MapboxMapAction.OnInvokeActionListener onInvokeActionListener) {
return new MapboxMapAction(onInvokeActionListener, maplibreMap);
protected MapLibreMapAction getMapboxMapAction(MapLibreMapAction.OnInvokeActionListener onInvokeActionListener) {
return new MapLibreMapAction(onInvokeActionListener, maplibreMap);
}

@After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
const subPackage = locals[1];
-%>
// This file is generated
package com.mapbox.mapboxsdk.plugins.gen.<%- subPackage %>;
package org.maplibre.android.plugins.gen.<%- subPackage %>;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import com.mapbox.mapboxsdk.plugins.testapp.activity.<%- subPackage %>.<%- activity %>;
import org.maplibre.android.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.<%- subPackage %>.<%- activity %>;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;

import timber.log.Timber;

Expand All @@ -15,7 +15,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import android.graphics.PointF;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.utils.ColorUtils;

import timber.log.Timber;
Expand All @@ -19,7 +19,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;

import timber.log.Timber;

Expand All @@ -15,7 +15,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import android.graphics.PointF;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.utils.ColorUtils;

import timber.log.Timber;
Expand All @@ -19,7 +19,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;

import timber.log.Timber;

Expand All @@ -15,7 +15,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import android.graphics.PointF;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.utils.ColorUtils;

import timber.log.Timber;
Expand All @@ -19,7 +19,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import android.view.View;

import org.maplibre.android.maps.MapLibreMap;

import org.hamcrest.Matcher;

import androidx.test.espresso.UiController;
import androidx.test.espresso.ViewAction;
import org.hamcrest.Matcher;
import org.maplibre.android.maps.MapLibreMap;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;

public class MapboxMapAction implements ViewAction {
public class MapLibreMapAction implements ViewAction {

private OnInvokeActionListener invokeViewAction;
private MapLibreMap maplibreMap;

public MapboxMapAction(OnInvokeActionListener invokeViewAction, MapLibreMap maplibreMap) {
public MapLibreMapAction(OnInvokeActionListener invokeViewAction, MapLibreMap maplibreMap) {
this.invokeViewAction = invokeViewAction;
this.maplibreMap = maplibreMap;
}
Expand All @@ -40,7 +36,7 @@ public void perform(UiController uiController, View view) {
}

public static void invoke(MapLibreMap maplibreMap, OnInvokeActionListener invokeViewAction) {
onView(withId(android.R.id.content)).perform(new MapboxMapAction(invokeViewAction, maplibreMap));
onView(withId(android.R.id.content)).perform(new MapLibreMapAction(invokeViewAction, maplibreMap));
}

public interface OnInvokeActionListener {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;

import timber.log.Timber;

Expand All @@ -15,7 +15,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

// This file is generated.

package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import android.graphics.PointF;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.maplibre.android.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.BaseActivityTest;
import com.mapbox.mapboxsdk.plugins.testapp.activity.TestActivity;
import org.maplibre.android.plugins.BaseActivityTest;
import org.maplibre.android.plugins.testapp.activity.TestActivity;
import org.maplibre.android.utils.ColorUtils;

import timber.log.Timber;
Expand All @@ -19,7 +19,7 @@

import java.util.Objects;

import static com.mapbox.mapboxsdk.plugins.annotation.MapboxMapAction.invoke;
import static org.maplibre.android.plugins.annotation.MapLibreMapAction.invoke;
import static org.junit.Assert.*;
import static org.maplibre.android.style.layers.Property.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.mapbox.mapboxsdk.plugins.annotation;
package org.maplibre.android.plugins.annotation;

import android.view.View;

import org.hamcrest.Matcher;

import androidx.test.espresso.UiController;
import androidx.test.espresso.ViewAction;
import org.hamcrest.Matcher;

import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package com.mapbox.mapboxsdk.plugins.offline;

import com.mapbox.mapboxsdk.plugins.offline.model.OfflineDownloadOptions;
import com.mapbox.mapboxsdk.plugins.offline.offline.OfflinePlugin;
import com.mapbox.mapboxsdk.plugins.testapp.R;
import com.mapbox.mapboxsdk.plugins.testapp.activity.offline.OfflineDownloadActivity;
package org.maplibre.android.plugins.offline;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.maplibre.android.plugins.offline.model.OfflineDownloadOptions;
import org.maplibre.android.plugins.offline.offline.OfflinePlugin;
import org.maplibre.android.plugins.testapp.R;
import org.maplibre.android.plugins.testapp.activity.offline.OfflineDownloadActivity;

import java.util.List;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
Expand Down
Loading

0 comments on commit 72a5729

Please sign in to comment.