mirror of
https://github.com/uber/RIBs.git
synced 2026-06-16 12:54:31 +00:00
Integrate Spotless into build (#415)
* Integrate Spotless in build * Update CONTRIBUTING.md * Move improperly placed copyright comments * Update copyright indent * Don't format test fixtures * Run spotlessApply over the whole repo * Remove checkstyle configs * Run spotlessCheck on CI
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.uber.rib;
|
||||
|
||||
import android.view.ViewGroup;
|
||||
@@ -21,16 +20,13 @@ import com.uber.rib.core.RibActivity;
|
||||
import com.uber.rib.core.ViewRouter;
|
||||
import com.uber.rib.root.RootBuilder;
|
||||
|
||||
/**
|
||||
* The sample app's single activity.
|
||||
*/
|
||||
/** The sample app's single activity. */
|
||||
public class RootActivity extends RibActivity {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected ViewRouter<?, ?> createRouter(ViewGroup parentViewGroup) {
|
||||
RootBuilder rootBuilder = new RootBuilder(new RootBuilder.ParentComponent() {
|
||||
});
|
||||
RootBuilder rootBuilder = new RootBuilder(new RootBuilder.ParentComponent() {});
|
||||
return rootBuilder.build(parentViewGroup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.uber.rib;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,25 +13,20 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.uber.rib.root;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.uber.rib.core.InteractorBaseComponent;
|
||||
import com.uber.rib.core.ViewBuilder;
|
||||
import com.uber.rib.tutorial1.R;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
import javax.inject.Scope;
|
||||
|
||||
import dagger.Binds;
|
||||
import dagger.BindsInstance;
|
||||
import dagger.Provides;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||
import java.lang.annotation.Retention;
|
||||
import javax.inject.Scope;
|
||||
|
||||
/** Builder for the {@link RootScope}. */
|
||||
public class RootBuilder extends ViewBuilder<RootView, RootRouter, RootBuilder.ParentComponent> {
|
||||
@@ -49,7 +44,8 @@ public class RootBuilder extends ViewBuilder<RootView, RootRouter, RootBuilder.P
|
||||
public RootRouter build(ViewGroup parentViewGroup) {
|
||||
RootView view = createView(parentViewGroup);
|
||||
RootInteractor interactor = new RootInteractor();
|
||||
Component component = DaggerRootBuilder_Component.builder()
|
||||
Component component =
|
||||
DaggerRootBuilder_Component.builder()
|
||||
.parentComponent(getDependency())
|
||||
.view(view)
|
||||
.interactor(interactor)
|
||||
@@ -81,10 +77,7 @@ public class RootBuilder extends ViewBuilder<RootView, RootRouter, RootBuilder.P
|
||||
}
|
||||
|
||||
@RootScope
|
||||
@dagger.Component(
|
||||
modules = Module.class,
|
||||
dependencies = ParentComponent.class
|
||||
)
|
||||
@dagger.Component(modules = Module.class, dependencies = ParentComponent.class)
|
||||
interface Component extends InteractorBaseComponent<RootInteractor>, BuilderComponent {
|
||||
|
||||
@dagger.Component.Builder
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,15 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.uber.rib.root;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.uber.rib.core.Bundle;
|
||||
import com.uber.rib.core.Interactor;
|
||||
import com.uber.rib.core.RibInteractor;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** Coordinates Business Logic for {@link RootBuilder.RootScope}. */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.uber.rib.root;
|
||||
|
||||
import com.uber.rib.core.ViewRouter;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -13,13 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.uber.rib.root;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.FrameLayout;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/** Top level view for {@link RootBuilder.RootScope}. */
|
||||
public class RootView extends FrameLayout implements RootInteractor.RootPresenter {
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2017. Uber Technologies
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.uber.rib.root;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2017. Uber Technologies
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.uber.rib.root;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
Reference in New Issue
Block a user