Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
shell: bash
run: |
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
echo "ANDROID_NDK_VERSION=28.1.13356709" >> $GITHUB_ENV
echo "ANDROID_NDK_VERSION=28.2.13676358" >> $GITHUB_ENV
- name: Cached Android NDK
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
shell: bash
run: |
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
echo "ANDROID_NDK_VERSION=28.1.13356709" >> $GITHUB_ENV
echo "ANDROID_NDK_VERSION=28.2.13676358" >> $GITHUB_ENV
- name: Cached Android NDK
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v4
Expand Down Expand Up @@ -115,6 +115,7 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 27
disk-size: 5GB
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
ndk: ${{ env.ANDROID_NDK_VERSION }}
cmake: 3.31.5
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
shell: bash
run: |
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
echo "ANDROID_NDK_VERSION=28.1.13356709" >> $GITHUB_ENV
echo "ANDROID_NDK_VERSION=28.2.13676358" >> $GITHUB_ENV
- name: Cached Android NDK
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v4
Expand Down Expand Up @@ -118,6 +118,7 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 27
disk-size: 5GB
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
ndk: ${{ env.ANDROID_NDK_VERSION }}
cmake: 3.31.5
Expand Down
51 changes: 25 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import org.gradle.internal.os.OperatingSystem
import org.gradle.kotlin.dsl.register
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.dokka.Platform
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.util.*

plugins {
kotlin("multiplatform") version "2.2.0"
id("org.jetbrains.dokka") version "1.9.20"
kotlin("multiplatform") version "2.2.21"
id("org.jetbrains.dokka") version "2.1.0"
`maven-publish`
}

Expand All @@ -17,13 +18,13 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:8.7.3")
classpath("com.android.tools.build:gradle:8.13.1")
}
}

allprojects {
group = "fr.acinq.secp256k1"
version = "0.21.0"
version = "0.22.0-SNAPSHOT"

repositories {
google()
Expand Down Expand Up @@ -130,7 +131,7 @@ allprojects {
}

allprojects {
val javadocJar = tasks.create<Jar>("javadocJar") {
val javadocJar = tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
Expand Down Expand Up @@ -172,25 +173,21 @@ allprojects {

if (project.name !in listOf("native", "tests")) {
afterEvaluate {
val dokkaOutputDir = layout.buildDirectory.dir("dokka").get().asFile

tasks.dokkaHtml {
outputDirectory.set(file(dokkaOutputDir))
dokkaSourceSets {
configureEach {
val platformName = when (platform.get()) {
Platform.jvm -> "jvm"
Platform.js -> "js"
Platform.native -> "native"
Platform.common -> "common"
Platform.wasm -> "wasm"
else -> error("invalid platform ${platform.get()}")
}
displayName.set(platformName)

perPackageOption {
matchingRegex.set(".*\\.internal.*") // will match all .internal packages and sub-packages
suppress.set(true)
val dokkaOutputDir = layout.buildDirectory.dir("dokka")

dokka {
moduleName = "secp256k1-kmp"
dokkaPublications.html {
outputDirectory.set(dokkaOutputDir)
dokkaSourceSets {
configureEach {
val platformName = analysisPlatform.get().name
displayName.set(platformName)

perPackageOption {
matchingRegex.set(".*\\.internal.*") // will match all .internal packages and sub-packages
suppress.set(true)
}
}
}
}
Expand All @@ -200,8 +197,10 @@ allprojects {
delete(dokkaOutputDir)
}

javadocJar.dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
javadocJar.from(dokkaOutputDir)
javadocJar {
dependsOn(deleteDokkaOutputDir, tasks.dokkaGenerate)
from(dokkaOutputDir)
}
}
}
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 7 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -112,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -203,15 +205,15 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
6 changes: 4 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -68,11 +70,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
5 changes: 3 additions & 2 deletions jni/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.gradle.kotlin.dsl.register
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
Expand Down Expand Up @@ -40,7 +41,7 @@ android {
}
}

ndkVersion = "28.1.13356709"
ndkVersion = "28.2.13676358"

afterEvaluate {
tasks.withType<com.android.build.gradle.tasks.factory.AndroidUnitTest>().all {
Expand All @@ -65,7 +66,7 @@ afterEvaluate {
create<MavenPublication>("android") {
artifactId = "secp256k1-kmp-jni-android"
from(components["release"])
val sourcesJar = task<Jar>("sourcesJar") {
val sourcesJar = tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(android.sourceSets["main"].java.srcDirs)
}
Expand Down
6 changes: 3 additions & 3 deletions jni/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.gradle.kotlin.dsl.register
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
Expand All @@ -24,7 +25,7 @@ dependencies {
api(rootProject)
}

val generateHeaders by tasks.creating(JavaCompile::class) {
val generateHeaders by tasks.registering(JavaCompile::class) { ->
group = "build"
classpath = sourceSets["main"].compileClasspath
destinationDirectory.set(layout.buildDirectory.dir("generated/jni"))
Expand All @@ -33,7 +34,6 @@ val generateHeaders by tasks.creating(JavaCompile::class) {
"-h", layout.buildDirectory.dir("generated./jni").get().asFile.absolutePath,
"-d", layout.buildDirectory.dir("generated./jni-tmp").get().asFile.absolutePath
)
// options.verbose = true
doLast {
layout.buildDirectory.dir("generated/jni-tmp").get().asFile.delete()
}
Expand All @@ -44,7 +44,7 @@ publishing {
create<MavenPublication>("jvm") {
artifactId = "secp256k1-kmp-jni-common"
from(components["java"])
val sourcesJar = task<Jar>("sourcesJar") {
val sourcesJar = tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
Expand Down
Loading
Loading