Skip to content

Commit

Permalink
Merge pull request #7 from miurahr/topic-utilize-gradle-omegat
Browse files Browse the repository at this point in the history
Utilize gradle omegat plugin
  • Loading branch information
briacp authored Mar 7, 2021
2 parents 0e0e5f8 + 4750395 commit ebfda6f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 42 deletions.
50 changes: 11 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit ebfda6f

Please sign in to comment.