Skip to content

Commit 385ce5f

Browse files
committed
Fixed durian-swt ghpages publishing.
1 parent 2d90bbc commit 385ce5f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

durian-swt/build.gradle

+30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
plugins {
2+
id 'org.ajoberstar.github-pages' version '1.6.0'
3+
}
14

25
apply plugin: 'com.diffplug.gradle.eclipse.mavencentral'
36
eclipseMavenCentral { release SWT_VERSION, {
@@ -48,3 +51,30 @@ task interactiveTest(type: Test) {
4851
includeCategories 'com.diffplug.common.swt.InteractiveTest'
4952
}
5053
}
54+
55+
//////////////////
56+
// GITHUB PAGES //
57+
//////////////////
58+
def verSnapshot = { it.endsWith('-SNAPSHOT') ? 'snapshot' : it }
59+
def cred = {
60+
if (System.env[it] != null) {
61+
return System.env[it]
62+
} else if (project.hasProperty(it)) {
63+
return project[it]
64+
} else {
65+
return 'unknown_' + it
66+
}
67+
}
68+
githubPages {
69+
repoUri = "https://github.com/diffplug/durian-swt"
70+
deleteExistingFiles = false
71+
pages {
72+
from javadoc.destinationDir
73+
into "javadoc/${verSnapshot(project.version)}"
74+
}
75+
credentials {
76+
username = cred('gh_token')
77+
password = ''
78+
}
79+
}
80+
tasks.prepareGhPages.dependsOn(":javadoc")

0 commit comments

Comments
 (0)