plugins { id 'java-library' id 'com.github.johnrengelman.shadow' version "${shadowVersion}" } defaultTasks 'shadowJar' apply from: '../../java_tools/dependencies.gradle' dependencies { implementation global_libs.annotations implementation ts_plugin_libs.httpcore implementation ts_plugin_libs.httpmime implementation project(':autoupdate') implementation ts_plugin_libs.launcher_api implementation global_libs.commons_logging } def jarName = 'rusefi_ts_plugin_launcher' def jarDir = 'jar' def localPath = '.efianalytics/TunerStudio/plugins' def userHome = System.properties['user.home'] jar { archiveBaseName = jarName manifest { attributes( 'Built-Date': new Date().format('yyyy-MM-dd HH:mm:ss'), 'Signature-Vendor': 'rusEFI LLC', 'ApplicationPlugin': 'com.rusefi.ts_plugin.TsPluginLauncher' ) } } shadowJar { /* to exclude suffix '-all' in resulting archive file name */ archiveBaseName = jarName archiveClassifier = '' destinationDirectory = file( 'build' + '/' + jarDir ) manifest { inheritFrom project.tasks.jar.manifest } /* to keep only required dependencies in resulting jar */ dependencies { exclude(dependency(global_libs.annotations)) exclude(dependency(ts_plugin_libs.launcher_api)) } } tasks.register('launcher_local_install', Copy) { dependsOn tasks.shadowJar from layout.buildDirectory.dir( jarDir + '/' + jarName + '.jar') into layout.buildDirectory.dir(userHome + '/' + localPath) }