Skip to content

Commit a6f5477

Browse files
authored
feat: refactor code (#1467)
* feat: refactor code * refactor: code refactor, switch to gradle
1 parent 6a8a770 commit a6f5477

File tree

18 files changed

+313
-359
lines changed

18 files changed

+313
-359
lines changed
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
target/
2-
!.mvn/wrapper/maven-wrapper.jar
3-
!**/src/main/**/target/
4-
!**/src/test/**/target/
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
56

67
### IntelliJ IDEA ###
78
.idea/modules.xml
@@ -11,6 +12,9 @@ target/
1112
*.iws
1213
*.iml
1314
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
1418

1519
### Eclipse ###
1620
.apt_generated
@@ -20,25 +24,19 @@ target/
2024
.settings
2125
.springBeans
2226
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
2330

2431
### NetBeans ###
2532
/nbproject/private/
2633
/nbbuild/
2734
/dist/
2835
/nbdist/
2936
/.nb-gradle/
30-
build/
31-
!**/src/main/**/build/
32-
!**/src/test/**/build/
3337

3438
### VS Code ###
3539
.vscode/
3640

3741
### Mac OS ###
38-
.DS_Store
39-
40-
### Maven build temp files ###
41-
release.properties
42-
pom.xml.releaseBackup
43-
pom.xml.tag
44-
pom.xml.next
42+
.DS_Store
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
2+
import com.vanniktech.maven.publish.SonatypeHost
3+
4+
plugins {
5+
id 'java'
6+
id("com.vanniktech.maven.publish") version "0.30.0"
7+
}
8+
// Basic project information
9+
group = 'com.alchemy.accountkit'
10+
version = '0.2.0-SNAPSHOT'
11+
description = 'This is an Alchemy signer SDK'
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
17+
// Set Java compatibility
18+
java {
19+
sourceCompatibility = JavaVersion.VERSION_17
20+
targetCompatibility = JavaVersion.VERSION_17
21+
}
22+
dependencies {
23+
implementation 'com.google.crypto.tink:tink:1.16.0'
24+
implementation 'org.bitcoinj:bitcoinj-core:0.17'
25+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.3'
26+
implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
27+
implementation 'com.auth0:java-jwt:4.5.0'
28+
29+
// Lombok (provided scope in Maven = 'compileOnly' in Gradle + annotationProcessor if needed)
30+
compileOnly 'org.projectlombok:lombok:1.18.36'
31+
annotationProcessor 'org.projectlombok:lombok:1.18.36'
32+
33+
// Test dependencies
34+
testImplementation 'org.junit.platform:junit-platform-commons:1.12.0'
35+
testImplementation 'org.junit.platform:junit-platform-launcher:1.12.0'
36+
testImplementation 'org.junit.jupiter:junit-jupiter:5.12.0'
37+
38+
testImplementation platform('org.junit:junit-bom:5.10.0')
39+
testImplementation 'org.junit.jupiter:junit-jupiter'
40+
}
41+
42+
test {
43+
useJUnitPlatform()
44+
}
45+
46+
47+
mavenPublishing {
48+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
49+
50+
signAllPublications()
51+
52+
coordinates("com.alchemy.accountkit", "signer-sdk", "0.1.1-alpha")
53+
pom {
54+
name = "Signer SDK"
55+
description = "Alchemy singer SDK."
56+
inceptionYear = "2025"
57+
url = "https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/java/signer-sdk"
58+
licenses {
59+
license {
60+
name = "MIT license"
61+
url = "https://github.com/alchemyplatform/aa-sdk/blob/main/LICENSE"
62+
distribution = "https://github.com/alchemyplatform/aa-sdk/blob/main/LICENSE"
63+
}
64+
}
65+
developers {
66+
developer {
67+
id = "andysim3d"
68+
name = "Pengfei Zhang"
69+
url = "https://github.com/username/andysim3d"
70+
}
71+
developer {
72+
id = "moldy530"
73+
name = "Michael Moldoveanu"
74+
url = "https://github.com/username/moldy530"
75+
}
76+
developer {
77+
id = "dphilipson"
78+
name = "David Philipson"
79+
url = "https://github.com/username/dphilipson"
80+
}
81+
}
82+
scm {
83+
url = "https://github.com/alchemyplatform/aa-sdk"
84+
connection = "scm:git:git@github.com:alchemyplatform/aa-sdk.git"
85+
developerConnection = "scm:git:git@github.com:alchemyplatform/aa-sdk.git"
86+
}
87+
}
88+
}

account-kit/java/signer-sdk/pom.xml

Lines changed: 0 additions & 219 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rootProject.name = 'signer-sdk'
2+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
package com.alchemy.aa.client;
22

3+
/**
4+
* Http configuration for signer client
5+
*
6+
* @param apiKey apiKey to call alchemy api
7+
* @param url alchemy api url
8+
*/
39
public record HttpConfig(String apiKey, String url) {
10+
/**
11+
* default HttpConfig with only alchemy url
12+
* @param apiKey apiKey to call alchemy api
13+
*/
414
public HttpConfig(String apiKey) {
515
this(apiKey, "https://api.g.alchemy.com/signer/v1/");
616
}
17+
18+
719
}

0 commit comments

Comments
 (0)