Skip to content

Commit c880f75

Browse files
committed
Update AGP
1 parent 5f1e01e commit c880f75

8 files changed

+198
-193
lines changed

build.gradle

-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +0,0 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
6-
dependencies {
7-
classpath 'com.android.tools.build:gradle:7.0.0-alpha14'
8-
}
9-
}
10-
11-
allprojects {
12-
repositories {
13-
google()
14-
mavenCentral()
15-
}
16-
}
17-
18-
task clean(type: Delete) {
19-
delete rootProject.buildDir
20-
}

curl/build.gradle

+15-41
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,21 @@ plugins {
55
}
66

77
android {
8-
compileSdkVersion 30
9-
buildToolsVersion "30.0.3"
10-
ndkVersion '21.4.7075529'
8+
compileSdkVersion 32
9+
buildToolsVersion "32.0.0"
10+
ndkVersion '23.1.7779620'
1111
defaultConfig {
1212
minSdkVersion 16
13-
targetSdkVersion 30
14-
versionCode 1
15-
versionName '7.75.0'
13+
targetSdkVersion 32
14+
versionCode 2
15+
versionName '7.83.0'
1616
externalNativeBuild {
1717
ndkBuild {
1818
arguments "-j${Runtime.runtime.availableProcessors()}"
1919
}
2020
}
2121
}
2222

23-
buildTypes {
24-
release {
25-
minifyEnabled true
26-
}
27-
}
28-
2923
compileOptions {
3024
sourceCompatibility JavaVersion.VERSION_11
3125
targetCompatibility JavaVersion.VERSION_11
@@ -46,38 +40,19 @@ android {
4640
headers "src/main/native/curl/include"
4741
}
4842
}
49-
}
50-
51-
dependencies {
52-
api 'io.github.vvb2060.ndk:boringssl:2.1'
53-
}
5443

55-
afterEvaluate {
56-
android.libraryVariants.collect { variant ->
57-
task("generate${variant.name.capitalize()}SourcesJar", type: Jar) {
58-
from variant.javaCompileProvider.get().source
59-
classifier 'sources'
60-
}
61-
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
62-
if (JavaVersion.current() >= JavaVersion.VERSION_1_9) {
63-
options.addStringOption "-release", "8"
64-
}
65-
source variant.javaCompileProvider.get().source
66-
classpath += variant.javaCompileProvider.get().classpath
67-
classpath += files(android.getBootClasspath())
68-
options {
69-
failOnError false
70-
encoding 'UTF-8'
71-
}
72-
}
73-
task("generate${variant.name.capitalize()}JavadocJar", type: Jar) {
74-
dependsOn "generate${variant.name.capitalize()}Javadoc"
75-
from tasks.getByName("generate${variant.name.capitalize()}Javadoc").destinationDir
76-
classifier 'javadoc'
44+
publishing {
45+
singleVariant("release") {
46+
withSourcesJar()
47+
withJavadocJar()
7748
}
7849
}
7950
}
8051

52+
dependencies {
53+
api 'io.github.vvb2060.ndk:boringssl:3.0'
54+
}
55+
8156
publishing {
8257
publications {
8358
mavenJava(MavenPublication) {
@@ -86,8 +61,6 @@ publishing {
8661
version android.defaultConfig.versionName
8762
afterEvaluate {
8863
from components.release
89-
artifact generateReleaseJavadocJar
90-
artifact generateReleaseSourcesJar
9164
}
9265
pom {
9366
name = 'curl'
@@ -102,6 +75,7 @@ publishing {
10275
developers {
10376
developer {
10477
name = 'vvb2060'
78+
url = 'https://github.com/vvb2060'
10579
}
10680
}
10781
scm {

example/build.gradle

+10-11
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ plugins {
33
}
44

55
android {
6-
compileSdkVersion 30
7-
buildToolsVersion "30.0.3"
8-
ndkVersion '21.4.7075529'
6+
compileSdkVersion 32
7+
buildToolsVersion "32.0.0"
8+
ndkVersion '23.1.7779620'
99
defaultConfig {
1010
applicationId "io.github.vvb2060.ndk.curl.example"
1111
minSdkVersion 16
12-
targetSdkVersion 30
12+
targetSdkVersion 32
1313
versionCode 1
1414
versionName "1.0"
1515
externalNativeBuild {
@@ -21,10 +21,7 @@ android {
2121

2222
buildTypes {
2323
release {
24-
minifyEnabled true
25-
shrinkResources true
2624
signingConfig signingConfigs.debug
27-
proguardFiles 'proguard-rules.pro'
2825
}
2926
}
3027

@@ -41,12 +38,14 @@ android {
4138
externalNativeBuild {
4239
ndkBuild.path 'src/main/native/Android.mk'
4340
}
44-
}
4541

46-
repositories {
47-
mavenLocal()
42+
packagingOptions {
43+
jniLibs {
44+
useLegacyPackaging false
45+
}
46+
}
4847
}
4948

5049
dependencies {
51-
implementation 'io.github.vvb2060.ndk:curl:7.75.0'
50+
implementation 'io.github.vvb2060.ndk:curl:7.83.0'
5251
}

gradle.properties

-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
# Project-wide Gradle settings.
2-
# IDE (e.g. Android Studio) users:
3-
# Gradle settings configured through the IDE *will override*
4-
# any settings specified in this file.
5-
# For more details on how to configure your build environment visit
6-
# http://www.gradle.org/docs/current/userguide/build_environment.html
7-
# Specifies the JVM arguments used for the daemon process.
8-
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10-
# When configured, Gradle will run in incubating parallel mode.
11-
# This option should only be used with decoupled projects. More details, visit
12-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13-
# org.gradle.parallel=true
14-
# AndroidX package structure to make it clearer which packages are bundled with the
15-
# Android operating system, and which are packaged with your app"s APK
16-
# https://developer.android.com/topic/libraries/support-library/androidx-rn
171
android.useAndroidX=true

gradle/wrapper/gradle-wrapper.jar

618 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)