Skip to content

Commit

Permalink
Embedded proguard.txt file to AAR library which should get rid of Cla…
Browse files Browse the repository at this point in the history
…ssNotFoundExceptions automatically
  • Loading branch information
yasirkula committed Apr 12, 2021
1 parent 5f469e7 commit 4901b85
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 6 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .github/AAR Source (Android)/proguard.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class com.yasirkula.unity.* { *; }
Binary file added Plugins/TextureOps/Android/TextureOps.aar
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Plugins/TextureOps/Android/TextureOps.jar
Binary file not shown.
16 changes: 14 additions & 2 deletions Plugins/TextureOps/Editor/TOPostProcessBuild.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#if UNITY_IOS
using System.IO;
using UnityEditor;
using UnityEngine;
#if UNITY_IOS
using UnityEditor.Callbacks;
using System.IO;
using UnityEditor.iOS.Xcode;
#endif

public class TOPostProcessBuild
{
private const bool ENABLED = true;

[InitializeOnLoadMethod]
public static void ValidatePlugin()
{
string jarPath = "Assets/Plugins/TextureOps/Android/TextureOps.jar";
if( File.Exists( jarPath ) )
{
Debug.Log( "Deleting obsolete " + jarPath );
AssetDatabase.DeleteAsset( jarPath );
}
}

#if UNITY_IOS
#pragma warning disable 0162
[PostProcessBuild]
Expand Down
2 changes: 1 addition & 1 deletion Plugins/TextureOps/TextureOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ public static ImageProperties GetImageProperties( string imagePath )
mimeType = properties[2].Trim();
if( mimeType.Length == 0 )
{
String extension = Path.GetExtension( imagePath ).ToLowerInvariant();
string extension = Path.GetExtension( imagePath ).ToLowerInvariant();
if( extension == ".png" )
mimeType = "image/png";
else if( extension == ".jpg" || extension == ".jpeg" )
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.yasirkula.textureops",
"displayName": "Texture Ops",
"version": "1.1.1",
"version": "1.1.2",
"documentationUrl": "https://github.com/yasirkula/UnityTextureOps",
"changelogUrl": "https://github.com/yasirkula/UnityTextureOps/releases",
"licensesUrl": "https://github.com/yasirkula/UnityTextureOps/blob/master/LICENSE.txt",
Expand Down

0 comments on commit 4901b85

Please sign in to comment.