Gradle error in stream api variables in Appium automation

I have converted my maven appium automation to gradle recently. When i try to build using gradle it throws compileTestJava error. But it was working fine while running from Maven. Attached my import, code and error logs as follows. Can somebody please help me on this?

import com.TCS.nlapp.model.Customer;
import com.TCS.nlapp.model.Card;
import com.TCS.nlapp.model.Product;
import com.TCS.nlapp.utils.CsvFileReader;
import com.google.common.base.Predicate;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileBy;
import static java.util.stream.Collectors.toList;
import io.appium.java_client.PerformsTouchActions;
import io.appium.java_client.TouchAction;
import io.appium.java_client.android.AndroidTouchAction;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import io.appium.java_client.touch.TapOptions;
import io.appium.java_client.touch.offset.ElementOption;
import io.appium.java_client.touch.offset.PointOption;
import io.cucumber.java.Scenario;
import net.serenitybdd.core.Serenity;
import net.serenitybdd.core.environment.EnvironmentSpecificConfiguration;
import net.serenitybdd.core.pages.PageObject;
import net.thucydides.core.steps.StepEventBus;
import net.thucydides.core.util.EnvironmentVariables;
import net.thucydides.core.util.SystemEnvironmentVariables;
import net.thucydides.core.webdriver.WebDriverFacade;
import org.apache.commons.lang3.RandomStringUtils;

import org.openqa.selenium.*;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.util.stream.Collectors;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Optional;
import java.util.Properties;
public static Customer getCustomer(String userType) {
    Optional customer = CsvFileReader.getCustomerDataFromCsv().stream()
                                     .filter(c -> c.getCustomerType().equals(userType))
                                     .findFirst();

    if (customer.isPresent()) {
        return customer.get();
    } else {
        throw new RuntimeException(String.format("Customer %s not found!", userType));
    }
}

Error it shows:

/src/test/java/com//pages/AppiumPageObject.java:502: error: cannot find symbol
.filter(c -> c.getCustomerType().equals(userType))
^
symbol: method getCustomerType()
location: variable c of type com.TCS.app.model.Customer

What is com.TCS.app.model.Customer and how does it relate to com.TCS.nlapp.model.Customer?
What is com.TCS.nlapp.utils.CsvFileReader?
Do you maybe have a version conflict that is resolved differently by Gradle (by default higher version wins) than it was resolved by Maven (nearest top-most declaration wins)?

com.TCS.app.model.Customer: I’m importing other package to use their method in my class.Attached my both gradle and POM ,can you check this please? Sorry for long one as I couldn’t attach as attachment.
This is my gradle build.
dependencies {
implementation ‘net.serenity-bdd:serenity-core:2.3.12’
implementation ‘io.cucumber:cucumber-java:6.9.1’
implementation ‘io.cucumber:cucumber-junit:6.9.1’
implementation ‘net.serenity-bdd:serenity-stats:2.3.12’
implementation ‘com.applitools:eyes-appium-java4:4.2.1’
implementation ‘cglib:cglib:3.3.0’
implementation ‘org.apache.commons:commons-lang3:3.8.1’
implementation ‘org.seleniumhq.selenium:selenium-api:3.141.59’
implementation ‘com.fasterxml.jackson.core:jackson-databind:2.13.1’
implementation ‘com.fasterxml.jackson.core:jackson-core:2.13.1’
implementation ‘com.fasterxml.jackson.core:jackson-annotations:2.13.1’
implementation ‘com.opencsv:opencsv:5.1’
implementation ‘com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.13.1’
implementation ‘org.projectlombok:lombok:1.18.22’
testImplementation ‘net.serenity-bdd:serenity-cucumber6:2.3.12’
testImplementation ‘net.serenity-bdd:serenity-screenplay:2.3.12’
testImplementation ‘net.serenity-bdd:serenity-screenplay-webdriver:2.3.12’
testImplementation ‘net.serenity-bdd:serenity-junit:2.3.12’
testImplementation ‘org.slf4j:slf4j-log4j12:1.7.7’
testImplementation ‘junit:junit:4.13.1’
testImplementation ‘org.assertj:assertj-core:3.6.2’
testImplementation ‘org.hamcrest:hamcrest-all:1.3’
testImplementation ‘com.saucelabs:saucerest:1.0.23’
}

This is my POM

<?xml version="1.0" encoding="UTF-8"?>


4.0.0
com.NL.Mobile
nlAndroidSerenityFramework
1.0.0-SNAPSHOT
jar

<name>NL Android Serenity project using Cucumber and WebDriver</name>

<properties>
    <serenity.version>2.3.12</serenity.version>
    <serenity.maven.version>2.3.12</serenity.maven.version>
    <serenity.cucumber.version>2.3.12</serenity.cucumber.version>
    <cucumber.version>6.9.1</cucumber.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <webdriver.driver>appium</webdriver.driver>
    <!--suppress UnresolvedMavenProperty -->
    <build.number>${current.time}</build.number>
</properties>

<repositories>
  <repository>
    <snapshots>
    	<enabled>false</enabled>
    </snapshots>
    <id>central</id>
    <name>bintray</name>
    <url>https://repo1.maven.org/maven2/</url>
  </repository>
</repositories>

<pluginRepositories>
  <pluginRepository>
    <snapshots>
    <enabled>false</enabled>
    </snapshots>
    <id>central</id>
    <name>bintray-plugins</name>
    <url>https://repo1.maven.org/maven2/</url>
  </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-core</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber6</artifactId>
        <version>${serenity.cucumber.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay-webdriver</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>${cucumber.version}</version>
    </dependency>
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>${cucumber.version}</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-stats</artifactId>
        <version>${serenity.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.7</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.6.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
        <scope>test</scope>
    </dependency>
    
  	<dependency>
    	<groupId>com.saucelabs</groupId>
    	<artifactId>saucerest</artifactId>
    	<version>1.0.23</version>
    	<scope>test</scope>
  	</dependency>
    <!-- https://mvnrepository.com/artifact/com.applitools/eyes-common-java4 -->
	<dependency>
	    <groupId>com.applitools</groupId>
	    <artifactId>eyes-appium-java4</artifactId>
	    <version>4.2.1</version>
	</dependency>
    <!-- https://mvnrepository.com/artifact/cglib/cglib -->
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.8.1</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-api</artifactId>
        <version>3.141.59</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.8.1</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>2.3.12</version>
        <scope>compile</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.13.1</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
        <version>2.13.0</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.13.1</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.13.1</version>
    </dependency>

    <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>5.1</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-csv -->
    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-csv</artifactId>
        <version>2.13.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok (For setterPrefix and Jackson)-->
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.22</version>
        <scope>compile</scope>
    </dependency>


</dependencies>

<build>
    <plugins>
        <plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<version>3.0.0-M5</version>
			<configuration>
				<skip>true</skip>
			</configuration>
		</plugin>
		<plugin>
            <groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-failsafe-plugin</artifactId>
			<version>3.0.0-M3</version>
			<configuration>
				<includes>
					 <include>**/*.java</include>
				</includes>
				<argLine>-Xmx512m</argLine>
				<systemPropertyVariables>
					<webdriver.driver>${webdriver.driver}</webdriver.driver>
				</systemPropertyVariables>
			</configuration>
			<executions>
				<execution>
					<goals>
						<goal>integration-test</goal>
						<goal>verify</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.maven.version}</version>
            <configuration>
                <!--suppress UnresolvedMavenProperty -->
                <tags>${tags}</tags>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-core</artifactId>
                    <version>${serenity.version}</version>
                </dependency>
                <dependency>
                    <groupId>io.appium</groupId>
                    <artifactId>java-client</artifactId>
                    <version>7.0.0</version>
                </dependency>


               <!--  https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java-->
                <dependency>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-java</artifactId>
                    <version>3.141.59</version>
                </dependency>
                <dependency>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-support</artifactId>
                    <version>3.141.59</version>
                    <scope>test</scope>
                </dependency>

            </dependencies>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                    <!--<configuration>
                        <outputDirectory>${basedir}/target/${build.number}</outputDirectory>
                    </configuration>-->
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>3.2.0</version>
            <executions>
                <execution>
                    <id>current-time</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>timestamp-property</goal>
                    </goals>
                    <configuration>
                        <name>current.time</name>
                        <pattern>dd-MM-yyyy_HH-mm-ss</pattern>
                        <timeZone>GMT+13</timeZone>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

You didn’t even bother to properly format your code using three backticks and the language like

```groovy
your code here
``​`

That makes it pretty unreadable.

But even if it were readable I’m sorry, but I’m not going to review 400 lines of code of someone else in my spare time without getting paid for it.

Besides that, the class it complains about is not even part of your list of dependencies.

I gave you pointers where to look at.
If you need further help, you probably need to at least provide an MCVE.

That’s fine. As I’m new to forum,I don’t know that. But, at the same time I don’t wanna ask your spare time without money (i thought gradle community is free forum).Somebody will help me if they can.

As I’m new to forum,I don’t know that.

Of course, that’s why I asked you to do it that way, so it becomes readable.
Just edit your post and add the formatting. :wink:

But, at the same time I don’t wanna ask your spare time without money (i thought gradle community is free forum).

That’s the point, it is a free forum where most time just fellow users like me that want to help are answering in their spare time. Asking such people to review 400 lines is well, questionable in my opinion, especially when you got the pointers on how to investigate and at the same time did not provide the information asked for. :wink:
A list of dependencies is not too helpful if the class that is complained about is not even part of it.