Properly Using Gradle war plugin with complex project

Hi all, I have been tasked with migrating a legacy project of ours to using gradle.

It is a Tomcat back-end which uses primarily API routes to serve data out to a SPA front-end.

The backend previously had all dependencies managed through manually downloaded .jar files. Now we are looking to have them pulled in through Gradle automatically.

I have been able to stumble my way through most of the issues I have encountered thus far, but this one eludes me.

My project is a mono-repo structured as such

Project Root

  • src
    • com
      • orgA
      • orgB
        • Logic Files
  • web
    • web-inf (Tomcat)
    • folders of JSPs

com.orgA.* and com.orgB.* are used heavily to create the API responses that are served out of the API.

My build.gradle looks like this

plugins {
    id 'base'
    id 'idea'
    id 'war'
war {
    webAppDirName = file('web')
    manifest {
        attributes 'Implementation-Title': 'xxx',
                'Implementation-Version': version  
sourceCompatibility = 1.8
targetCompatibility = 1.8

sourceSets {
    main {
        java {
            srcDir 'src'
repositories {
    maven {....}

dependencies {
// These dependencies are manually imported. When pulling the from a web source the app does not compile. We will be upgrading these dependencies first.
    providedCompile files("${webAppDirName}/WEB-INF/lib/Aspose.BarCode.jar") 
    providedCompile files("${webAppDirName}/WEB-INF/lib/Aspose.Cells.jar")
    providedCompile files("${webAppDirName}/WEB-INF/lib/aspose.pdf-17.6-javadoc.jar")
    providedCompile files("${webAppDirName}/WEB-INF/lib/aspose.pdf-17.6.jar")
    providedCompile files("${webAppDirName}/WEB-INF/lib/Aspose.Words.jdk16.jar")
    providedCompile files("${webAppDirName}/WEB-INF/lib/jpos191-controls.jar")
    providedCompile files("${webAppDirName}/WEB-INF/lib/jpos191.jar")
    providedCompile files("${webAppDirName}/WEB-INF/lib/firebase-admin-8.1.0.jar")
    compileOnly group: 'org.apache.tomcat', name: 'tomcat-catalina', version: '8.5.32'
    implementation group: 'org.apache.tomcat', name: 'tomcat-jasper', version: '8.5.13'

When the app has the .war file build and I unzip it. I do not see the logic files that are present within /src inside of it and I am unsure how to add them in.

If I don’t remember wrongly, it should just work.
Can you provide a full MCVE that demonstrates the problem, e. g. as a ZIP or as a GitHub project?