Deploy Spark webapp (java app) on Heroku...
Deploy Spark webapp (java app) on Heroku... // /src/main/java/Main.java import static spark . Spark .*; import java.util.Optional ; import spark.Spark ; public class Main { public static void main ( String [] args ) { // set port Optional . ofNullable ( System . getProperty ( "heroku.port" )) . map ( Integer: : parseInt ) . ifPresent ( Spark: : port ); get ( "/" , ( req , res ) -> "HELLO WORLD" ); } } // build.gradle plugins { id 'java' id 'application' } repositories { jcenter () } mainClassName = 'Main' installDist . destinationDir = file ( 'target' ) dependencies { compile 'com.sparkjava:spark-core:2.8.0' } task install ( dependsOn: [ installDist ]) { doLast { def libdir = file ( new File ( installDist . destinationDir , 'lib' )) def deps = libdir ....