Révision | 6edcd3f9a5093a8e406d3126720ebb32423fd2ed (tree) |
---|---|
l'heure | 2015-10-21 12:09:19 |
Auteur | MirrgieRiana |
Commiter | MirrgieRiana |
update: build.gradle, .hgignore; add: artifact: src, javadoc
@@ -3,3 +3,6 @@ | ||
3 | 3 | projects/*/build/ |
4 | 4 | projects/*/.settings/ |
5 | 5 | projects/*/.gradle/ |
6 | +backup/ | |
7 | +*.lnk | |
8 | +projects/*/.classpath |
@@ -1,10 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<classpath> | |
3 | - <classpathentry kind="src" path="src/main/java"/> | |
4 | - <classpathentry kind="src" path="src/main/resources"/> | |
5 | - <classpathentry kind="src" path="src/test/java"/> | |
6 | - <classpathentry kind="src" path="src/test/resources"/> | |
7 | - <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |
8 | - <classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/> | |
9 | - <classpathentry kind="output" path="bin"/> | |
10 | -</classpath> |
@@ -24,15 +24,42 @@ | ||
24 | 24 | |
25 | 25 | jar { |
26 | 26 | manifest { |
27 | + //attributes 'Main-Class' : 'Main' | |
27 | 28 | attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version |
28 | 29 | } |
29 | 30 | } |
30 | 31 | |
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 | +} | |
46 | + | |
47 | +artifacts { | |
48 | + archives sourcesJar | |
49 | + archives javadocJar | |
50 | +} | |
51 | + | |
31 | 52 | repositories { |
32 | 53 | mavenCentral() |
54 | + maven { | |
55 | + url '../../maven' | |
56 | + } | |
57 | + | |
58 | + // ★mirrgリポジトリのデフォルトURL | |
33 | 59 | //maven { |
34 | 60 | // url 'http://hg.pf.osdn.jp/view/t/ta/tacticsrealize/mirrg.struct.hydrogen/raw-file/tip/maven' |
35 | 61 | //} |
62 | + | |
36 | 63 | } |
37 | 64 | |
38 | 65 | test { |
@@ -41,9 +68,22 @@ | ||
41 | 68 | |
42 | 69 | uploadArchives { |
43 | 70 | repositories { |
71 | + | |
72 | + // ★まとまったJarとしてフォルダ出力する場合 | |
73 | + //flatDir { | |
74 | + // dirs 'repos' | |
75 | + //} | |
76 | + | |
77 | + // ★mavenプロジェクトとして出力する場合 | |
44 | 78 | mavenDeployer { |
45 | 79 | pom.artifactId = project.archivesBaseName.replace('.', '-') |
46 | 80 | repository(url: 'file://localhost/' + file('../../maven').getAbsolutePath()) |
47 | 81 | } |
82 | + | |
48 | 83 | } |
49 | 84 | } |
85 | + | |
86 | +// ★まとまったJarとしてフォルダ出力する場合 | |
87 | +//jar { | |
88 | +// from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | |
89 | +//} |