Try the following:
gradle.properties, set tomatVersion and appServer to blank:
appServer=
tomcatVersion=
Include this dependency in build.gradle:
implementation "org.apereo.cas:cas-server-webapp:${project.'cas.version'}
Create src/main/webapp/WEB-INF/jboss-deployment-structure.xml with following contents:
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="jdk.unsupported" />
</dependencies>
<exclude-subsystems>
<subsystem name="jaxrs" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
Do a gradlew clean build, then grab the cas.war and deploy to your wildfly instance