-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d234e2c
commit 90f24e5
Showing
5 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: spiro | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'buildSrc/**' | ||
- 'spiro/**' | ||
- '.github/workflows/build.yml' | ||
- '.github/workflows/spiro.yml' | ||
|
||
jobs: | ||
build: | ||
name: spiro | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
package: spiro |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ include(":lcms2") | |
include(":openjpeg") | ||
include(":fribidi") | ||
include(":libtool") | ||
include(":spiro") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
import com.android.ndkports.AutoconfPortTask | ||
import com.android.ndkports.CMakeCompatibleVersion | ||
import com.android.ndkports.PrefabSysrootPlugin | ||
import org.gradle.jvm.tasks.Jar | ||
|
||
val portVersion = "20221101" | ||
|
||
group = rootProject.group | ||
version = "${portVersion}-beta-1" | ||
|
||
plugins { | ||
id("maven-publish") | ||
id("signing") | ||
id("com.android.ndkports.NdkPorts") | ||
} | ||
|
||
ndkPorts { | ||
ndkPath.set(File(project.findProperty("ndkPath") as String)) | ||
minSdkVersion.set(rootProject.extra.get("minSdkSupportedByNdk").toString().toInt()) | ||
source.set(project.file("lib${name}-dist-${portVersion}.tar.gz")) | ||
} | ||
|
||
tasks.prefab { | ||
generator.set(PrefabSysrootPlugin::class.java) | ||
} | ||
|
||
tasks.register<AutoconfPortTask>("buildPort") { | ||
autoconf { } | ||
} | ||
|
||
fun File.replace(oldValue: String, newValue: String, ignoreCase: Boolean = false): File { | ||
writeText(readText().replace(oldValue, newValue, ignoreCase)) | ||
return this | ||
} | ||
|
||
tasks.extractSrc { | ||
doLast { | ||
// No libthread.so on Android. Threads are available by default, no need to link against it | ||
outDir.get().asFile.resolve("tests/Makefile.in").replace("@WANTPTHREADS_TRUE@am__append_1 = -lpthread", "") | ||
} | ||
} | ||
|
||
tasks.prefabPackage { | ||
version.set(CMakeCompatibleVersion.parse(portVersion)) | ||
|
||
licensePath.set("COPYING") | ||
|
||
modules { | ||
create("spiro") { | ||
static.set(project.findProperty("libraryType") == "static") | ||
} | ||
} | ||
} | ||
|
||
val packageSources = tasks.register<Jar>("packageSources") { | ||
archiveClassifier.set("sources") | ||
from(projectDir.resolve("build.gradle.kts")) | ||
from(ndkPorts.source) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("release") { | ||
from(components["prefab"]) | ||
artifactId += rootProject.extra.get("ndkVersionSuffix") | ||
artifactId += rootProject.extra.get("libraryTypeSuffix") | ||
artifact(packageSources) | ||
pom { | ||
name.set("Spiro") | ||
description.set("A library for curve design. Clothoid to bezier conversion. A mechanism for drawing smooth contours with constant curvature at the spline joins.") | ||
url.set("https://github.com/fontforge/libspiro") | ||
licenses { | ||
license { | ||
name.set("GPLv3") | ||
url.set("https://raw.githubusercontent.com/fontforge/libspiro/20221101/COPYING") | ||
distribution.set("repo") | ||
} | ||
} | ||
developers { | ||
// Developer list obtained from: | ||
// https://raw.githubusercontent.com/fontforge/libspiro/20221101/AUTHORS | ||
developer { | ||
name.set("Raph Levien") | ||
email.set("raph.levien@gmail.com") | ||
} | ||
developer { | ||
name.set("George Williams") | ||
email.set("gww@silcom.com") | ||
} | ||
developer { | ||
name.set("Joe Da Silva") | ||
} | ||
developer { | ||
name.set("Dave Crossland") | ||
} | ||
developer { | ||
name.set("Shriramana Sharma") | ||
} | ||
developer { | ||
name.set("Horváth Balázs") | ||
} | ||
developer { | ||
name.set("Luigi Scarso") | ||
} | ||
developer { | ||
name.set("Jeremy Tan") | ||
} | ||
developer { | ||
name.set("Wiesław Šoltés") | ||
} | ||
developer { | ||
name.set("Mingye Wang") | ||
} | ||
developer { | ||
name.set("Frederic Cambus") | ||
} | ||
developer { | ||
name.set("Fredrick Brennan") | ||
} | ||
developer { | ||
name.set("C.W. Betts") | ||
} | ||
developer { | ||
id.set("orbea") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/ViliusSutkus89/ndkports") | ||
connection.set("scm:git:https://github.com/ViliusSutkus89/ndkports.git") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
System.getenv("SIGNING_KEY")?.let { signingKey -> | ||
signing { | ||
isRequired = true | ||
useInMemoryPgpKeys(signingKey, System.getenv("SIGNING_PASS")) | ||
sign(publishing.publications.findByName("release")) | ||
} | ||
} | ||
} |
Git LFS file not shown