From 47503952902847cd897b9b33aa52cd6da03d56da Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 7 Mar 2021 23:42:04 +0900 Subject: [PATCH] Utilize gradle omegat plugin Signed-off-by: Hiroshi Miura --- build.gradle | 50 +++++++++++------------------------------------ gradle.properties | 7 ++++--- 2 files changed, 15 insertions(+), 42 deletions(-) diff --git a/build.gradle b/build.gradle index 4b30d62..961a0a1 100644 --- a/build.gradle +++ b/build.gradle @@ -3,50 +3,22 @@ plugins { id 'distribution' id 'idea' id 'eclipse' - id 'com.github.johnrengelman.shadow' version '6.1.0' + id "org.omegat.gradle" version "1.4.2" } -repositories { - maven { - url "https://dl.bintray.com/omegat-org/maven" - } - jcenter() -} - -dependencies { - compileOnly 'org.omegat:omegat:5.4.1' - compileOnly 'commons-io:commons-io:2.7' - compileOnly 'commons-lang:commons-lang:2.6' - compileOnly 'org.omegat:lib-mnemonics:1.0' - - implementation 'commons-cli:commons-cli:1.4' +omegat { + version = "5.4.1" + pluginClass = pluginMainClass } +sourceCompatibility = JavaVersion.VERSION_1_8 +targetCompatibility = JavaVersion.VERSION_1_8 -tasks.withType(JavaCompile) { - options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked" -} - -jar { - manifest { - // plugin's main class name is defined in gradle.properties file. - attributes( - "OmegaT-Plugins": pluginMainClass, - "Plugin-Version": project.version, - "Plugin-Name": pluginName, - "Plugin-Author": pluginAuthor, - "Plugin-Description": pluginDescription, - "Main-Class": pluginMainClass, - // Used to access the name/version inside the plugin - "Implementation-Title": pluginName, - "Implementation-Version": project.version - ) - } -} - -shadowJar { - // remove the '-all' suffix - classifier = '' +dependencies { + packIntoJar 'commons-cli:commons-cli:1.4' + implementation 'commons-io:commons-io:2.7' + implementation 'commons-lang:commons-lang:2.6' + implementation 'org.omegat:lib-mnemonics:1.0' } distributions { diff --git a/gradle.properties b/gradle.properties index 719c68d..7c5717b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,7 @@ pluginMainClass=net.briac.omegat.plugin.omt.ManageOMTPackage -pluginName=OMT Package Plugin -pluginAuthor=Briac Pilpr\u00e9 -pluginDescription=https://github.com/briacp/plugin-omt-package +plugin.name=OMT Package Plugin +plugin.author=Briac Pilpr\u00e9 +plugin.description=https://github.com/briacp/plugin-omt-package +plugin.link=https://github.com/briacp/plugin-omt-package version=1.6.4 omegatPluginDir=C:/Users/briac/AppData/Roaming/OmegaT/plugins/