Skip to content

Commit 8fa95f8

Browse files
author
Ven
committed
feat: 配置jitpack
1 parent 4f7cd96 commit 8fa95f8

File tree

7 files changed

+32
-98
lines changed

7 files changed

+32
-98
lines changed

assists/build.gradle

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4+
apply plugin: 'maven-publish'
45
android {
56
namespace 'com.ven.assists.base'
67
compileSdk 34
78

89
defaultConfig {
910
minSdk 24
1011

12+
versionCode 1
13+
versionName "1.0"
14+
1115
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1216
consumerProguardFiles "consumer-rules.pro"
1317
}
@@ -30,12 +34,23 @@ android {
3034
}
3135
}
3236

37+
afterEvaluate {
38+
publishing {
39+
publications {
40+
release(MavenPublication) {
41+
from components.release
42+
groupId = 'com.ven.assists.base'
43+
artifactId = 'assists-base'
44+
version = '3.0.0'
45+
}
46+
}
47+
}
48+
}
49+
3350
dependencies {
3451
implementation 'androidx.core:core-ktx:1.13.1'
3552
implementation 'androidx.activity:activity-ktx:1.9.0'
3653
implementation 'androidx.appcompat:appcompat:1.6.1'
3754
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.22')
3855
api 'com.blankj:utilcodex:1.31.1'
3956
}
40-
41-
apply from: rootProject.file("gradle/maven-publish.gradle")

gradle/maven-publish.gradle

Lines changed: 0 additions & 75 deletions
This file was deleted.

opencv-sdk/build.gradle

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ apply plugin: 'com.android.library'
9292
apply plugin: 'maven-publish'
9393
apply plugin: 'kotlin-android'
9494
apply plugin: 'kotlin-kapt'
95+
apply plugin: 'maven-publish'
9596

9697
def openCVersionName = "4.9.0"
9798
def openCVersionCode = ((4 * 100 + 9) * 100 + 0) * 10 + 0
9899

99100
println "OpenCV: " + openCVersionName + " " + project.buildscript.sourceFile
100101

101102
android {
102-
namespace 'org.opencv'
103+
namespace 'com.ven.assists.opencv'
103104
compileSdk 34
104105

105106
defaultConfig {
@@ -172,24 +173,17 @@ android {
172173
}
173174
}
174175

175-
publishing {
176-
publications {
177-
release(MavenPublication) {
178-
groupId = 'org.opencv'
179-
artifactId = 'opencv'
180-
version = '4.9.0'
181-
182-
afterEvaluate {
176+
afterEvaluate {
177+
publishing {
178+
publications {
179+
release(MavenPublication) {
183180
from components.release
181+
groupId = 'com.ven.assists.opencv'
182+
artifactId = 'assists-opencv'
183+
version = '0.0.1'
184184
}
185185
}
186186
}
187-
repositories {
188-
maven {
189-
name = 'myrepo'
190-
url = "${project.buildDir}/repo"
191-
}
192-
}
193187
}
194188

195189
dependencies {

opencv-sdk/java/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.opencv">
3+
package="com.ven.assists.opencv">
44

55
<application>
66
<provider
7-
android:name=".assists.AssistsOpencvFileProvider"
7+
android:name="org.opencv.assists.AssistsOpencvFileProvider"
88
android:authorities="${applicationId}.assistsopencv.fileprovider"
99
android:exported="false"
1010
android:grantUriPermissions="true">

opencv-sdk/java/src/org/opencv/android/CameraBridgeViewBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import java.util.List;
44

5-
import org.opencv.BuildConfig;
6-
import org.opencv.R;
5+
import com.ven.assists.opencv.BuildConfig;
6+
import com.ven.assists.opencv.R;
77
import org.opencv.core.Mat;
88
import org.opencv.core.Size;
99

opencv-sdk/java/src/org/opencv/android/CameraGLSurfaceView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.opencv.android;
22

3-
import org.opencv.R;
3+
import com.ven.assists.opencv.R;
44

55
import android.content.Context;
66
import android.content.res.TypedArray;

opencv-sdk/java/src/org/opencv/android/JavaCameraView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import android.util.Log;
1313
import android.view.ViewGroup.LayoutParams;
1414

15-
import org.opencv.BuildConfig;
15+
import com.ven.assists.opencv.BuildConfig;
1616
import org.opencv.core.CvType;
1717
import org.opencv.core.Mat;
1818
import org.opencv.core.Size;

0 commit comments

Comments
 (0)