Skip to content

Commit

Permalink
[v1.5.3]migrate to AndroidX; Update library versions and AGP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillingVan committed Nov 16, 2022
1 parent 98beac9 commit cad8d58
Show file tree
Hide file tree
Showing 69 changed files with 272 additions and 203 deletions.
11 changes: 5 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.6.21'
repositories {
maven{url"https://maven.google.com"}
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:4.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
maven{url"https://maven.google.com"}
jcenter()
google()
mavenCentral()
}
}

Expand Down
38 changes: 22 additions & 16 deletions canvasgl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@
*/

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.ChillingVan'
def VERSION_NAME="1.5.2.0"
apply plugin: 'maven-publish'
def NAMESPACE="com.github.ChillingVan"
group = NAMESPACE
def VERSION_NAME="1.5.3.0"

android {
compileSdkVersion 31
namespace = NAMESPACE
compileSdkVersion 32
defaultConfig {
minSdkVersion 14
targetSdkVersion 31
versionCode 105020
targetSdkVersion 32
versionCode 105030
versionName VERSION_NAME
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -55,7 +57,7 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'androidx.annotation:annotation:1.3.0'
}


Expand Down Expand Up @@ -84,14 +86,18 @@ artifacts {
archives javadocJar
}

/**
* Used to support other project uses mavenLocal() to refer this project which is convenient to debug
*/
install {
repositories.mavenInstaller {
pom.version = 'v' + VERSION_NAME
pom.artifactId = 'android-openGL-canvas'

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
from components.release
groupId = NAMESPACE
artifactId = 'android-openGL-canvas'
version = VERSION_NAME
}
}
}
}


7 changes: 4 additions & 3 deletions canvasgl/src/main/java/com/chillingvan/canvasgl/CanvasGL.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
import android.graphics.SurfaceTexture;
import android.opengl.GLES20;
import android.os.Build;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.BitmapTexture;
Expand All @@ -50,6 +47,10 @@
import java.util.Map;
import java.util.WeakHashMap;

import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* All the depth of textures are the same. So the texture drawn after will cover the texture drawn before.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import android.graphics.SurfaceTexture;
import android.opengl.GLES20;
import android.opengl.Matrix;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.BitmapTexture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package com.chillingvan.canvasgl;

import android.graphics.SurfaceTexture;
import android.support.annotation.Nullable;

import com.chillingvan.canvasgl.glcanvas.BasicTexture;
import com.chillingvan.canvasgl.glcanvas.RawTexture;
Expand All @@ -32,6 +31,8 @@

import java.util.List;

import androidx.annotation.Nullable;

/**
* @deprecated use {@link MultiTexOffScreenCanvas} instead
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import com.chillingvan.canvasgl.shapeFilter.DrawShapeFilter;
import com.chillingvan.canvasgl.textureFilter.TextureFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
import android.support.annotation.ColorInt;
import android.util.AttributeSet;

import com.chillingvan.canvasgl.CanvasGL;
Expand All @@ -13,6 +12,8 @@
import com.chillingvan.canvasgl.glview.GLView;
import com.chillingvan.canvasgl.util.Loggers;

import androidx.annotation.ColorInt;

/**
*
* From init to run: onSizeChange --> onSurfaceTextureAvailable --> createGLThread --> createSurface --> onSurfaceCreated --> onSurfaceChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@

import android.content.Context;
import android.graphics.SurfaceTexture;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.TextureView;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.util.Loggers;
import com.chillingvan.canvasgl.glview.texture.gles.EglContextWrapper;
import com.chillingvan.canvasgl.glview.texture.gles.GLThread;
import com.chillingvan.canvasgl.util.Loggers;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.Nullable;

/**
* Created by Chilling on 2016/10/31.
* Can be used in ScrollView or ListView.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import android.content.Context;
import android.graphics.SurfaceTexture;
import android.support.annotation.Nullable;
import android.util.AttributeSet;

import com.chillingvan.canvasgl.ICanvasGL;
Expand All @@ -31,6 +30,8 @@

import java.util.List;

import androidx.annotation.Nullable;

/**
* This class is used to accept eglContext and texture from outside. Then it can use them to draw.
* @deprecated Use {@link GLMultiTexConsumerView} instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import android.content.Context;
import android.graphics.SurfaceTexture;
import android.support.annotation.Nullable;
import android.util.AttributeSet;

import com.chillingvan.canvasgl.ICanvasGL;
Expand All @@ -32,6 +31,8 @@

import java.util.List;

import androidx.annotation.Nullable;

/**
* <p>
* This will generate a texture which is in the eglContext of the CanvasGL. And the texture can be used outside.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.chillingvan.canvasgl.glview.texture.gles;

import android.nfc.Tag;
import android.opengl.EGL14;
import android.opengl.EGLConfig;
import android.opengl.EGLContext;
import android.opengl.EGLDisplay;
import android.opengl.EGLExt;
import android.opengl.EGLSurface;
import android.os.Build;
import android.support.annotation.RequiresApi;

import com.chillingvan.canvasgl.util.FileLogger;

import androidx.annotation.RequiresApi;

import static com.chillingvan.canvasgl.glview.texture.gles.EglHelper.formatEglError;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import android.opengl.EGL14;
import android.opengl.EGLExt;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.Choreographer;

Expand All @@ -42,6 +40,9 @@
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;

import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

/**
* This is the thread where the gl draw runs in.
* Create GL Context --> Create Surface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.chillingvan.canvasgl.shapeFilter;

import android.opengl.GLES20;
import android.support.annotation.FloatRange;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;

import androidx.annotation.FloatRange;

/**
* Created by Chilling on 2016/11/11.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.chillingvan.canvasgl.textureFilter;

import android.opengl.GLES20;
import android.support.annotation.FloatRange;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;

import androidx.annotation.FloatRange;

/**
* Created by Chilling on 2017/4/15.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;

import android.opengl.GLES20;
import android.support.annotation.FloatRange;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;

import androidx.annotation.FloatRange;

/**
* Created by Matthew on 2016/10/14.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package com.chillingvan.canvasgl.textureFilter;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

/**
* Created by Chilling on 2016/10/17.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.chillingvan.canvasgl.textureFilter;

import android.support.annotation.FloatRange;
import androidx.annotation.FloatRange;

/**
* Created by Chilling on 2016/11/6.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;

import android.opengl.GLES20;
import android.support.annotation.FloatRange;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;

import androidx.annotation.FloatRange;

/**
* Created by Chilling on 2016/11/2.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;

import android.opengl.GLES20;
import android.support.annotation.FloatRange;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;

import androidx.annotation.FloatRange;

/**
* Created by Chilling on 2016/11/1.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package com.chillingvan.canvasgl.textureFilter;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

/**
* Created by Chilling on 2016/10/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import android.graphics.Bitmap;
import android.opengl.GLES20;
import android.support.annotation.FloatRange;
import android.support.annotation.NonNull;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;

import androidx.annotation.FloatRange;
import androidx.annotation.NonNull;

/**
* Created by Chilling on 2018/5/4.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
package com.chillingvan.canvasgl.textureFilter;

import android.opengl.GLES20;
import android.support.annotation.FloatRange;

import com.chillingvan.canvasgl.ICanvasGL;
import com.chillingvan.canvasgl.OpenGLUtil;
import com.chillingvan.canvasgl.glcanvas.BasicTexture;

import androidx.annotation.FloatRange;

/**
* Created by Chilling on 2016/11/1.
*/
Expand Down
Loading

0 comments on commit cad8d58

Please sign in to comment.