• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂d60ebce90702c27bf559f0fc86d455fd798e5f7c (tree)
時間2015-11-17 06:18:44
作者MirrgieRiana
CommiterMirrgieRiana

Log Message

mirrg.struct.hydrogen: update: template

Change Summary

差異

diff -r 6f59a56130a6 -r d60ebce90702 projects/mirrg.struct.hydrogen/build.gradle
--- a/projects/mirrg.struct.hydrogen/build.gradle Wed Oct 21 12:10:29 2015 +0900
+++ b/projects/mirrg.struct.hydrogen/build.gradle Tue Nov 17 06:18:44 2015 +0900
@@ -2,88 +2,142 @@
22 apply plugin: 'eclipse'
33 apply plugin: 'maven'
44
5-///////////////////////////////////
5+//////////////////////////////////////////////////////////////////////
66
7+// ★グループId
78 project.group = 'mirrg'
9+
10+// ★成果物のID
811 project.archivesBaseName = 'mirrg.struct.hydrogen'
912
10-version = '1.0'
11-
12-dependencies {
13- compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
14- testCompile group: 'junit', name: 'junit', version: '4.+'
15- // compile group: 'mirrg', name: 'mirrg-struct-hydrogen', version: '1.0'
16-}
17-
18-///////////////////////////////////
19-
20-sourceCompatibility = 1.8
21-targetCompatibility = 1.8
22-
23-tasks.withType(AbstractCompile)*.options*.encoding = tasks.withType(GroovyCompile)*.groovyOptions*.encoding = 'UTF-8'
24-
25-jar {
26- manifest {
27- //attributes 'Main-Class' : 'Main'
28- attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version
29- }
30-}
13+// ★成果物のバージョン
14+def superversion = '1.0' // 破壊的なバージョン変更
15+def subversion = '0' // 破壊的でないバージョン変更
3116
32-task sourcesJar(type: Jar, dependsOn:classes) {
33- classifier = 'sources'
34- from sourceSets.main.allSource
35-}
36-
37-task javadocJar(type: Jar, dependsOn:javadoc) {
38- classifier = 'javadoc'
39- from javadoc.destinationDir
40-}
41-
42-javadoc {
43- options.charSet = 'UTF-8'
44- options.encoding = 'UTF-8'
45-}
17+// ★依存関係
18+dependencies {
4619
47-artifacts {
48- archives sourcesJar
49- archives javadocJar
50-}
20+ testCompile group: 'junit', name: 'junit', version: '4.+'
5121
52-repositories {
53- mavenCentral()
54- maven {
55- url '../../maven'
56- }
57-
58- // ★mirrgリポジトリのデフォルトURL
59- //maven {
60- // url 'http://hg.pf.osdn.jp/view/t/ta/tacticsrealize/mirrg.struct.hydrogen/raw-file/tip/maven'
61- //}
22+ //compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
23+ //compile group: 'mirrg', name: 'mirrg.struct.hydrogen-1.0', version: '+'
6224
6325 }
6426
65-test {
66- systemProperties 'property': 'value'
27+// ★追加のリポジトリURL
28+def mavenRepositories = [
29+
30+ // ★mirrgリポジトリのデフォルトURL
31+ //'http://hg.pf.osdn.jp/view/t/ta/tacticsrealize/mirrg.struct.hydrogen/raw-file/tip/maven',
32+
33+]
34+
35+// ★実行可能Jar
36+def mainClass = null
37+
38+def outputLocation =
39+
40+ // ★'../../repos'にフォルダ出力する場合
41+ 'maven'
42+
43+ // ★'../../maven'にMavenプロジェクトとして出力する場合
44+ //'dir'
45+
46+// ★まとまったJarとして出力する
47+def allInOne = false
48+
49+//////////////////////////////////////////////////////////////////////
50+
51+version = superversion + "." + subversion
52+
53+// Javaコンパイル設定
54+
55+ // ソースのJava準拠指定
56+ sourceCompatibility = 1.8
57+ targetCompatibility = 1.8
58+
59+ // ソースのエンコーディング指定
60+ tasks.withType(AbstractCompile)*.options*.encoding = tasks.withType(GroovyCompile)*.groovyOptions*.encoding = 'UTF-8'
61+
62+// Meta-Info
63+jar {
64+ manifest {
65+
66+ // Mainクラス指定
67+ if (mainClass != null) attributes 'Main-Class' : mainClass
68+
69+ attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version
70+
71+ }
72+};
73+
74+// ソースとJavadocを成果物に含める
75+
76+ task sourcesJar(type: Jar, dependsOn:classes) {
77+ classifier = 'sources'
78+ from sourceSets.main.allSource
79+ }
80+
81+ task javadocJar(type: Jar, dependsOn:javadoc) {
82+ classifier = 'javadoc'
83+ from javadoc.destinationDir
84+ }
85+
86+ javadoc {
87+ options.charSet = 'UTF-8'
88+ options.encoding = 'UTF-8'
89+ }
90+
91+ artifacts {
92+ archives sourcesJar
93+ archives javadocJar
94+ }
95+
96+// 追加のMavenリポジトリURL設定
97+repositories {
98+ mavenCentral()
99+ maven {
100+ url '../../maven'
101+ }
102+
103+ mavenRepositories.each {
104+ def a = it
105+ maven {
106+ url a
107+ }
108+ }
109+
67110 }
68111
69-uploadArchives {
70- repositories {
112+/*
113+test {
114+ systemProperties 'property': 'value'
115+}
116+*/
71117
72- // ★まとまったJarとしてフォルダ出力する場合
73- //flatDir {
74- // dirs 'repos'
75- //}
118+// 成果物の出力先
119+uploadArchives {
120+ repositories {
76121
77- // ★mavenプロジェクトとして出力する場合
78- mavenDeployer {
79- pom.artifactId = project.archivesBaseName.replace('.', '-')
80- repository(url: 'file://localhost/' + file('../../maven').getAbsolutePath())
81- }
122+ if (outputLocation == 'dir') {
123+ flatDir {
124+ dirs '../../repos'
125+ }
126+ }
82127
83- }
128+ if (outputLocation == 'maven') {
129+ mavenDeployer {
130+ pom.artifactId = project.archivesBaseName + "-" + superversion
131+ repository(url: 'file://localhost/' + file('../../maven').getAbsolutePath())
132+ }
133+ }
134+
135+ }
84136 }
85137
86-// ★まとまったJarとしてフォルダ出力する場合
87-//jar {
88-// from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
89-//}
138+// 依存Jarを同封
139+if (allInOne) {
140+ jar {
141+ from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
142+ }
143+}
diff -r 6f59a56130a6 -r d60ebce90702 projects/mirrg.struct.hydrogen/src/main/java/mirrg/Dummy.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/mirrg.struct.hydrogen/src/main/java/mirrg/Dummy.java Tue Nov 17 06:18:44 2015 +0900
@@ -0,0 +1,6 @@
1+package mirrg;
2+
3+public class Dummy
4+{
5+
6+}
diff -r 6f59a56130a6 -r d60ebce90702 projects/mirrg.struct.hydrogen/src/main/resources/org/gradle/resource.xml
--- a/projects/mirrg.struct.hydrogen/src/main/resources/org/gradle/resource.xml Wed Oct 21 12:10:29 2015 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
1-<some-element/>
diff -r 6f59a56130a6 -r d60ebce90702 projects/mirrg.struct.hydrogen/src/test/java/mirrg/DummyTest.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/mirrg.struct.hydrogen/src/test/java/mirrg/DummyTest.java Tue Nov 17 06:18:44 2015 +0900
@@ -0,0 +1,6 @@
1+package mirrg;
2+
3+public class DummyTest
4+{
5+
6+}
diff -r 6f59a56130a6 -r d60ebce90702 projects/mirrg.struct.hydrogen/src/test/java/org/gradle/PersonTest.java
--- a/projects/mirrg.struct.hydrogen/src/test/java/org/gradle/PersonTest.java Wed Oct 21 12:10:29 2015 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
1-package org.gradle;
2-
3-public class PersonTest
4-{
5-
6-}
diff -r 6f59a56130a6 -r d60ebce90702 projects/mirrg.struct.hydrogen/src/test/resources/org/gradle/test-resource.xml
--- a/projects/mirrg.struct.hydrogen/src/test/resources/org/gradle/test-resource.xml Wed Oct 21 12:10:29 2015 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
1-<some-resource/>