Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b467988b authored by Baptiste Billard's avatar Baptiste Billard
Browse files

Plugin classpath moved to the root project

parent 4775112d
Loading
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="src" path="gen"/>
	<classpathentry kind="output" path="bin/classes"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
	<classpathentry kind="output" path="bin/default"/>
</classpath>
+10 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>OwnCloudNotes</name>
	<name>app</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
			<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
@@ -29,5 +34,6 @@
	<natures>
		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
	</natures>
</projectDescription>
+2 −0
Original line number Diff line number Diff line
connection.project.dir=..
eclipse.preferences.version=1
+28 −11
Original line number Diff line number Diff line
@@ -5,22 +5,27 @@ apply plugin: 'com.facebook.testing.screenshot'



buildscript {
  repositories {
    google()
    jcenter()
  }
//buildscript {
//  repositories {
//    google()
//    jcenter()
//  }

  dependencies {
    //for screenshot testing
    classpath 'com.facebook.testing.screenshot:plugin:0.13.0'
  }
}
//  dependencies {
//    //for screenshot testing
//    classpath 'com.facebook.testing.screenshot:plugin:0.13.0'
//  }
//}

android {
    compileSdkVersion 28
    buildToolsVersion '29.0.1'

    useLibrary 'android.test.runner'
    useLibrary 'android.test.base'
    useLibrary 'android.test.mock'


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
@@ -32,6 +37,8 @@ android {
        targetSdkVersion 28
        versionCode 49
        versionName "1.0.1"

        testInstrumentationRunner "com.facebook.testing.screenshot.app.ScreenshotTestRunner"
    }
    buildTypes {
        release {
@@ -70,4 +77,14 @@ dependencies {
    implementation "com.google.android.material:material:1.0.0"

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test:rules:1.1.0'
    // Optional -- Hamcrest library
    //androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
    // Optional -- UI testing with Espresso
    //androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    // Optional -- UI testing with UI Automator
    //androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'

}
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * 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.facebook.testing.screenshot;

import android.content.Context;
import android.view.LayoutInflater;
import androidx.test.platform.app.InstrumentationRegistry;
import com.facebook.litho.LithoView;
import com.facebook.testing.screenshot.Screenshot;
import com.facebook.testing.screenshot.ViewHelpers;
import org.junit.Test;

public class ExampleScreenshotTest {
  @Test
  public void testDefault() {
    Context targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
    LayoutInflater inflater = LayoutInflater.from(targetContext);
    LithoView view = (LithoView) inflater.inflate(R.layout.litho_view, null, false);

    view.setComponent(Example.create(view.getComponentContext()).build());

    ViewHelpers.setupView(view).setExactWidthDp(300).layout();
    Screenshot.snap(view).record();
  }
}
Loading