Last active
July 11, 2018 05:47
-
-
Save noriyukitakei/966c10b343d14085cb34cd48d1a4da74 to your computer and use it in GitHub Desktop.
多分わかりやすいマイクロサービス入門 〜 マイクロサービスフレームワーク「Azure Service Fabric」でLINE風なチャットアプリを作ろう!! 〜
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
sourceSets { | |
main { | |
// ソースのディレクトリを指定します。 | |
java.srcDirs = ['src'] | |
// コンパイルしたクラスの出力先を指定します。 | |
output.classesDir = 'out/classes' | |
resources { | |
// リソースファイルのディレクトリを指定します。 | |
srcDirs = ['src'] | |
} | |
} | |
} | |
clean.doFirst { | |
// コンパイルやビルドする前に一番最初に実行されるお掃除です。 | |
delete "${projectDir}/out" | |
delete "${projectDir}/ChatRPC.jar" | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
// 依存ライブラリのダウンロード先としてMaven Central Repositoryを定義します。 | |
compile ('com.microsoft.servicefabric:sf-actors:1.0.0') | |
} | |
jar { | |
// jarに含めるライブラリを指定しています。nativeという文字列を含まないディレクトリの場合はそのまま、 | |
// それ以外のものは解凍して展開した状態でjarに含めます。 | |
from configurations.compile.collect { | |
(it.isDirectory() && !it.getName().contains("native")) ? it : zipTree(it)} | |
manifest { | |
// メインメソッドがあるクラスを指定します。 | |
attributes( | |
'Main-Class': 'rpcmethods.ChatRPC') | |
// jarのファイル名を指定します。この場合、ChatRPC.jarという名前のファイルが出来上がります。 | |
baseName "ChatRPC" | |
// jarの出力先を指定します。Chat/ChatRPCにChatData.jarが出力されます。 | |
destinationDir = file('./') | |
} | |
// 下記に指定してあるファイルはjarには含めない指定です。 | |
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA' | |
} | |
// タスクを指定しなかった場合、以下の順番でタスクが実行されます。 | |
defaultTasks 'clean', 'jar' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment